Finish fixing round trip of gmutex's various lock bits. Patch by alex ionescu.

svn path=/trunk/; revision=39157
This commit is contained in:
Art Yerkes 2009-01-27 23:11:50 +00:00
parent 548f7458c7
commit a565c5b364

View file

@ -119,11 +119,11 @@ KiReleaseGuardedMutex(IN OUT PKGUARDED_MUTEX GuardedMutex)
if ((OldValue) && !(OldValue & GM_LOCK_WAITER_WOKEN))
{
/* Update the Oldvalue to what it should be now */
OldValue |= GM_LOCK_BIT;
OldValue += GM_LOCK_BIT;
/* The mutex will be woken, minus one waiter */
NewValue = (OldValue | GM_LOCK_WAITER_WOKEN);
NewValue -= GM_LOCK_WAITER_INC;
NewValue = OldValue + GM_LOCK_WAITER_WOKEN -
GM_LOCK_WAITER_INC;
/* Remove the Woken bit */
if (InterlockedCompareExchange(&GuardedMutex->Count,