00001 00016 #ifndef _ARCHDOC_H_ 00017 #define _ARCHDOC_H_ 00018 00023 #define MAX_CPUS 1 00024 00027 #define BITS 32 00028 00031 #define PHYS_BITS 32 00032 00040 typedef volatile int tSpinlock; 00044 #define LOCK(lockptr) do{while(*(tSpinlock*)lockptr)Threads_Yield();*(tSpinlock*)lockptr=1;}while(0) 00045 00048 #define RELEASE(lockptr) do{*(tSpinlock*)lockptr=0;}while(0) 00049 00052 //#define HALT() __asm__ __volatile__ ("hlt") 00053 00054 00059 typedef unsigned int Uint; 00060 typedef unsigned char Uint8; 00061 typedef unsigned short Uint16; 00062 typedef unsigned long Uint32; 00063 typedef unsigned long long Uint64; 00064 typedef signed int Sint; 00065 typedef signed char Sint8; 00066 typedef signed short Sint16; 00067 typedef signed long Sint32; 00068 typedef signed long long Sint64; 00069 00073 typedef Uint size_t; 00074 typedef Uint32 tVAddr; 00075 typedef Uint32 tPAddr; 00076 00088 typedef struct { 00089 Uint Arg4; 00090 Uint Arg3; 00091 Uint Arg2; 00092 union { 00093 Uint Arg1; 00094 Uint RetHi; 00095 }; 00096 union { 00097 Uint Num; 00098 Uint Return; 00099 }; 00100 00101 Uint StackPointer; 00102 } tSyscallRegs; 00103 00107 typedef struct sMemoryState tMemoryState; 00108 00112 typedef struct sTaskState tTaskState; 00113 00114 00124 #endif