mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
Fixed a bug in RtlLeaveCriticalSection. We have only to signal the event if someone waits on it.
svn path=/trunk/; revision=17538
This commit is contained in:
@@ -329,10 +329,11 @@ RtlLeaveCriticalSection(
|
||||
CriticalSection->OwningThread = 0;
|
||||
|
||||
/* Was someone wanting us? This needs to be done atomically. */
|
||||
InterlockedDecrement(&CriticalSection->LockCount);
|
||||
if (-1 != InterlockedDecrement(&CriticalSection->LockCount)) {
|
||||
|
||||
/* Let him have us */
|
||||
RtlpUnWaitCriticalSection(CriticalSection);
|
||||
/* Let him have us */
|
||||
RtlpUnWaitCriticalSection(CriticalSection);
|
||||
}
|
||||
}
|
||||
|
||||
/* Sucessful! */
|
||||
|
||||
Reference in New Issue
Block a user