Author: arty
Date: Tue Jan 27 17:11:50 2009
New Revision: 39157
URL:
http://svn.reactos.org/svn/reactos?rev=39157&view=rev
Log:
Finish fixing round trip of gmutex's various lock bits. Patch by alex ionescu.
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 17:11:50 2009
@@ -119,11 +119,11 @@
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,