Usermode/AxWin4 - Debugging quirks in ARCH=native
[tpg/acess2.git] / AcessNative / acesskernel_src / include / arch.h
index e99948c..868a056 100644 (file)
@@ -28,6 +28,9 @@ typedef intptr_t      tPAddr;
 
 typedef        int     BOOL;
 
+extern void    exit(int status) __attribute__((noreturn));
+#define HALT_CPU()     exit(1)
+
 #include <stddef.h>
 #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
 

UCC git Repository :: git.ucc.asn.au