Author: arty
Date: Tue Jan 27 03:35:01 2009
New Revision: 39130
URL:
http://svn.reactos.org/svn/reactos?rev=39130&view=rev
Log:
This code used to round down the number of waiters to a multiple of 2. Fine
if there are exactly one or zero waiters, not fine if there are 2 or more.
Modified:
trunk/reactos/ntoskrnl/ke/gmutex.c
Modified: trunk/reactos/ntoskrnl/ke/gmutex.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/gmutex.c?rev=3…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/gmutex.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/gmutex.c [iso-8859-1] Tue Jan 27 03:35:01 2009
@@ -123,7 +123,7 @@
/* The mutex will be woken, minus one waiter */
NewValue = (OldValue | GM_LOCK_WAITER_WOKEN);
- NewValue &= ~GM_LOCK_WAITER_INC;
+ NewValue -= GM_LOCK_WAITER_INC;
/* Remove the Woken bit */
if (InterlockedCompareExchange(&GuardedMutex->Count,