update for HEAD-2003091401
[reactos.git] / ntoskrnl / ex / fmutex.c
index 0c98cbd..87d662f 100644 (file)
@@ -35,6 +35,9 @@
 
 /* FUNCTIONS *****************************************************************/
 
+/*
+ * @implemented
+ */
 VOID FASTCALL
 ExAcquireFastMutexUnsafe(PFAST_MUTEX FastMutex)
 {
@@ -52,16 +55,19 @@ ExAcquireFastMutexUnsafe(PFAST_MUTEX FastMutex)
   FastMutex->Owner = KeGetCurrentThread();
 }
 
+/*
+ * @implemented
+ */
 VOID FASTCALL
 ExReleaseFastMutexUnsafe(PFAST_MUTEX FastMutex)
 {
   assert(FastMutex->Owner == KeGetCurrentThread());
   FastMutex->Owner = NULL;
+  InterlockedExchange(&FastMutex->Count, 1);
   if (FastMutex->Contention > 0)
     {
       KeSetEvent(&FastMutex->Event, 0, FALSE);
     }
-  InterlockedExchange(&FastMutex->Count, 1);
 }
 
 /* EOF */