RtlpCreateCriticalSectionSem: use InterlockedCompareExchangePointer instead of InterlockedCompareExchange for a handle

svn path=/trunk/; revision=34581
This commit is contained in:
Timo Kreuzer
2008-07-18 23:47:33 +00:00
parent 8fddba3256
commit 8bbca850f6
+2 -2
View File
@@ -65,8 +65,8 @@ RtlpCreateCriticalSectionSem(PRTL_CRITICAL_SECTION CriticalSection)
}
DPRINT("Created Event: %p \n", hNewEvent);
if ((hEvent = (HANDLE)_InterlockedCompareExchange((PLONG)&CriticalSection->LockSemaphore,
(LONG)hNewEvent,
if ((hEvent = (HANDLE)_InterlockedCompareExchangePointer((PVOID*)&CriticalSection->LockSemaphore,
(PVOID)hNewEvent,
0))) {
/* Some just created an event */