Separated Architecture independent thread controll into the root of the tree
[tpg/acess2.git] / Kernel / arch / x86 / include / arch.h
index 9c16b18..0611c6c 100644 (file)
@@ -42,6 +42,7 @@
 #define LOCK(lockptr)  do {int v=1;\
        while(v)__asm__ __volatile__("lock xchgl %%eax, (%%edi)":"=a"(v):"a"(1),"D"(lockptr));}while(0)
 #define        RELEASE(lockptr)        __asm__ __volatile__("lock andl $0, (%%edi)"::"D"(lockptr));
+#define        HALT()  __asm__ __volatile__ ("hlt")
 
 // === TYPES ===
 typedef unsigned int   Uint;   // Unsigned machine native integer
@@ -109,6 +110,18 @@ typedef struct {
        Uint8   BaseHi;
 } __attribute__ ((packed)) tGDT;
 
+typedef struct {
+       #if USE_PAE
+       Uint    PDPT[4];
+       #else
+       Uint    CR3;
+       #endif
+} tMemoryState;
+
+typedef struct {
+       Uint    EIP, ESP, EBP;
+} tTaskState;
+
 // --- Interface Flags & Macros
 #define CLONE_VM       0x10
 

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