Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

8 lines
319 B

#define Lock(_a) EnterCriticalSection(_a)
#define Unlock(_a) LeaveCriticalSection(_a)
#define CreateSem(_Initial) CreateSemaphoreA(NULL,(_Initial),-1,NULL)
#define DestroySem(_hSem) CloseHandle((_hSem))
#define Wait(_A) WaitForSingleObject((_A),0xFFFFFFFF)
#define Signal(_A) ReleaseSemaphore((_A), 1, NULL)