mirror of
https://github.com/reactos/reactos.git
synced 2024-07-12 07:35:10 +00:00
Finish fixing round trip of gmutex's various lock bits. Patch by alex ionescu.
svn path=/trunk/; revision=39157
This commit is contained in:
parent
548f7458c7
commit
a565c5b364
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue