X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=AcessNative%2Facesskernel_src%2Finclude%2Farch.h;h=868a0569c424934ea761926eff33e6211291c17e;hb=9a9053e91df6e08761e2ce72be350c5c2233153b;hp=e99948c97fcb3536856101e7134b6bcd7b3ce1c2;hpb=36b950d17b828c7cd2e5e9dbe5fb4cbded89889c;p=tpg%2Facess2.git diff --git a/AcessNative/acesskernel_src/include/arch.h b/AcessNative/acesskernel_src/include/arch.h index e99948c9..868a0569 100644 --- a/AcessNative/acesskernel_src/include/arch.h +++ b/AcessNative/acesskernel_src/include/arch.h @@ -28,6 +28,9 @@ typedef intptr_t tPAddr; typedef int BOOL; +extern void exit(int status) __attribute__((noreturn)); +#define HALT_CPU() exit(1) + #include #undef offsetof @@ -36,9 +39,13 @@ struct sShortSpinlock void *Mutex; }; -#define SHORTLOCK(...) -#define SHORTREL(...) -#define CPU_HAS_LOCK(...) 0 +extern void Threads_int_ShortLock(void **Ptr); +extern void Threads_int_ShortRel(void **Ptr); +extern int Threads_int_ShortHas(void **Ptr); + +#define SHORTLOCK(l) Threads_int_ShortLock(&(l)->Mutex) +#define SHORTREL(l) Threads_int_ShortRel(&(l)->Mutex) +#define CPU_HAS_LOCK(l) Threads_int_ShortHas(&(l)->Mutex) //#define NUM_CFG_ENTRIES 10