X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=AcessNative%2Facesskernel_src%2Finclude%2Farch.h;h=868a0569c424934ea761926eff33e6211291c17e;hb=ca9a575116285753b48fd8e0ae6dcdbf8a4af5b1;hp=e98578907a201446b8ed26c8b7a8139153a88c1b;hpb=b5a1402b18d2f8cb360bf2fc524609b374bac8ec;p=tpg%2Facess2.git diff --git a/AcessNative/acesskernel_src/include/arch.h b/AcessNative/acesskernel_src/include/arch.h index e9857890..868a0569 100644 --- a/AcessNative/acesskernel_src/include/arch.h +++ b/AcessNative/acesskernel_src/include/arch.h @@ -4,10 +4,11 @@ #define _ARCH_H_ #include -#include - +//#include +#undef CLONE_VM #define _MODULE_NAME_ "NativeKernel" +#define PAGE_SIZE 0x1000 // Assume, making an Ass out of u and me #define BITS (sizeof(intptr_t)*8) typedef uint8_t Uint8; @@ -25,13 +26,31 @@ typedef intptr_t Uint; typedef intptr_t tVAddr; typedef intptr_t tPAddr; +typedef int BOOL; + +extern void exit(int status) __attribute__((noreturn)); +#define HALT_CPU() exit(1) + +#include +#undef offsetof + struct sShortSpinlock { - int Lock; + void *Mutex; }; -#define SHORTLOCK(...) -#define SHORTREL(...) +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 + +extern void Debug_PutCharDebug(char ch); +extern void Debug_PutStringDebug(const char *str); #endif