Fixed CcTryToAcquireBrokenMutex.
authorHartmut Birr <osexpert@googlemail.com>
Sat, 26 Nov 2005 16:04:33 +0000 (16:04 +0000)
committerHartmut Birr <osexpert@googlemail.com>
Sat, 26 Nov 2005 16:04:33 +0000 (16:04 +0000)
svn path=/trunk/; revision=19639

reactos/ntoskrnl/cc/view.c

index ba99ae3..b9d9fb0 100644 (file)
@@ -115,7 +115,7 @@ FASTCALL
 CcTryToAcquireBrokenMutex(PFAST_MUTEX FastMutex)
 {
     KeEnterCriticalRegion();
-    if (InterlockedExchange(&FastMutex->Count, 0) == 1)
+    if (InterlockedCompareExchange(&FastMutex->Count, 0, 1) == 1)
     {
         FastMutex->Owner = KeGetCurrentThread();
         return(TRUE);