- Timestamp:
- 10/05/08 00:02:20 (2 months ago)
- Location:
- Whitix/branches/keobject/include
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
Whitix/branches/keobject/include/sched.h
r608 r1093 53 53 void ThrIdleFunc(); 54 54 55 /* Thread macros go here */56 #define ThrGetThread(thread) ((thread)->refs++)57 #define ThrReleaseThread(thread) \58 do { (thread)->refs--; if ((thread)->refs <= 0) ThrFreeThread((thread)); } while(0)59 60 #define ThrGetProcess(process) ((process)->refs++)61 #define ThrReleaseProcess(process) \62 do { (process)->refs--; if ((process)->refs <= 0) ThrFreeProcess((process)); } while(0)63 64 55 /*********************************************************************** 65 56 * -
Whitix/branches/keobject/include/task.h
r859 r1093 33 33 struct Thread 34 34 { 35 volatileDWORD currStack;35 DWORD currStack; 36 36 struct Process* parent; 37 37 DWORD state,entry,esp3; … … 44 44 struct JournalHandle* currHandle; /* Each thread can run its own transaction. */ 45 45 }; 46 47 #define ThrGetThread(thread) ((thread)->refs++) 48 #define ThrReleaseThread(thread) \ 49 do { (thread)->refs--; if ((thread)->refs <= 0) ThrFreeThread((thread)); } while(0) 46 50 47 51 extern struct Thread* idleTask; … … 56 60 { 57 61 struct ListHead next,sibling,children; 58 int exitCode, refs,state;62 int exitCode, state; 59 63 struct File* files; /* Dynamically allocated */ 60 64 Spinlock fileListLock; … … 66 70 DWORD pid; 67 71 int cId; 72 struct KeObject object; 68 73 struct ListHead areaList; 69 74 struct MemManager* memManager; … … 71 76 }; 72 77 78 #define ThrGetProcess(process) (KeObjGet(&process->object)) 79 #define ThrPutProcess(process) (KeObjPut(&process->object)) 80 73 81 #endif
