More SMP Work, also changed the physical allocator to allocate downwards
[tpg/acess2.git] / Kernel / arch / x86 / include / proc.h
1 /*
2  * AcessOS Microkernel Version
3  * proc.h
4  */
5 #ifndef _PROC_H
6 #define _PROC_H
7
8 #include <threads.h>
9
10 // === CONSTANTS ===
11 #define GETMSG_IGNORE   ((void*)-1)
12
13 // === TYPES ===
14 #if USE_MP
15 typedef struct sCPU
16 {
17         Uint8   APICID;
18         Uint8   State;  // 0: Unavaliable, 1: Idle, 2: Active
19         Uint16  Resvd;
20         tThread *Current;
21 }       tCPU;
22 #endif
23
24 typedef struct sTSS {
25         Uint32  Link;
26         Uint32  ESP0, SS0;
27         Uint32  ESP1, SS1;
28         Uint32  ESP2, SS2;
29         Uint32  CR3;
30         Uint32  EIP;
31         Uint32  EFLAGS;
32         Uint32  EAX, ECX, EDX, EBX;
33         Uint32  ESP, EBP, ESI, EDI;
34         Uint32  ES, CS, DS, SS, FS, GS;
35         Uint32  LDTR;
36         Uint16  Resvd, IOPB;    // IO Permissions Bitmap
37 } __attribute__((packed)) tTSS;
38
39 // === FUNCTIONS ===
40 extern void     Proc_Start();
41 extern int      Proc_Clone(Uint *Err, Uint Flags);
42
43 #endif

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