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.

svn path=/trunk/; revision=39130
This commit is contained in:
Art Yerkes 2009-01-27 09:35:01 +00:00
parent d68970475c
commit 16a9e8d714

View file

@ -123,7 +123,7 @@ KiReleaseGuardedMutex(IN OUT PKGUARDED_MUTEX GuardedMutex)
/* 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,