[ros-diffs] [arty] 39157: Finish fixing round trip of gmutex's various lock bits. Patch by alex ionescu.

arty at svn.reactos.org arty at svn.reactos.org
Wed Jan 28 00:11:50 CET 2009


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=39157&r1=39156&r2=39157&view=diff
==============================================================================
--- 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,



More information about the Ros-diffs mailing list