Changeset 7854 for trunk/src/kernel32/critsection.cpp
- Timestamp:
- Feb 9, 2002, 6:27:32 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/critsection.cpp
r4387 r7854 1 /* $Id: critsection.cpp,v 1. 7 2000-10-02 18:39:33sandervl Exp $ */1 /* $Id: critsection.cpp,v 1.8 2002-02-09 17:27:30 sandervl Exp $ */ 2 2 /* 3 3 * Win32 critical sections … … 24 24 25 25 26 #ifdef DEBUG27 HANDLE ODIN_EXTERN(CreateSemaphoreA) (LPSECURITY_ATTRIBUTES arg1, LONG arg2, LONG arg3,28 LPCSTR arg4);29 30 DWORD ODIN_EXTERN(WaitForSingleObject)(HANDLE hObject, DWORD timeout);31 32 HANDLE ODIN_EXTERN(ConvertToGlobalHandle)(HANDLE hHandle);33 #endif34 35 26 /*********************************************************************** 36 27 * InitializeCriticalSection (KERNEL32.472) (NTDLL.406) … … 42 33 crit->RecursionCount = 0; 43 34 crit->OwningThread = 0; 44 crit->LockSemaphore = C ALL_ODINFUNC(CreateSemaphoreA)( NULL, 0, 1, NULL );35 crit->LockSemaphore = CreateSemaphoreA( NULL, 0, 1, NULL ); 45 36 crit->Reserved = GetCurrentProcessId(); 46 37 } … … 93 84 for (;;) 94 85 { 95 res = CALL_ODINFUNC(WaitForSingleObject)( crit->LockSemaphore, 5000L );86 res = WaitForSingleObject( crit->LockSemaphore, 5000L ); 96 87 if ( res == WAIT_TIMEOUT ) 97 88 { 98 89 dprintf(("Critical section %p wait timed out, retrying (60 sec)\n", crit )); 99 res = CALL_ODINFUNC(WaitForSingleObject)( crit->LockSemaphore, 60000L );90 res = WaitForSingleObject( crit->LockSemaphore, 60000L ); 100 91 if ( res == WAIT_TIMEOUT && TRACE_ON(relay) ) 101 92 { … … 177 168 { 178 169 dprintf(("MakeCriticalSectionGlobal %x", crit)); 179 crit->LockSemaphore = C ALL_ODINFUNC(ConvertToGlobalHandle)( crit->LockSemaphore );170 crit->LockSemaphore = ConvertToGlobalHandle( crit->LockSemaphore ); 180 171 crit->Reserved = 0L; 181 172 }
Note:
See TracChangeset
for help on using the changeset viewer.