- Deprecated
authorAlex Ionescu <aionescu@gmail.com>
Sat, 19 Nov 2005 22:32:09 +0000 (22:32 +0000)
committerAlex Ionescu <aionescu@gmail.com>
Sat, 19 Nov 2005 22:32:09 +0000 (22:32 +0000)
svn path=/trunk/; revision=19353

reactos/ntoskrnl/cc/ccmutex.c [deleted file]

diff --git a/reactos/ntoskrnl/cc/ccmutex.c b/reactos/ntoskrnl/cc/ccmutex.c
deleted file mode 100644 (file)
index baea7e0..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*\r
- * COPYRIGHT:       See COPYING in the top level directory\r
- * PROJECT:         ReactOS kernel\r
- * FILE:            ntoskrnl/cc/ccmutex.c\r
- * PURPOSE:         Implements the Broken Mutex Implementation for the broken Cc\r
- * PROGRAMMERS:     Alex Ionescu (alex@relsoft.net)\r
- */\r
-\r
-/* INCLUDES *****************************************************************/\r
-\r
-#include <ntoskrnl.h>\r
-#include <internal/debug.h>\r
-\r
-/* FUNCTIONS *****************************************************************/\r
-\r
-VOID\r
-FASTCALL\r
-CcAcquireBrokenMutexUnsafe(PFAST_MUTEX FastMutex)\r
-{\r
-    ASSERT(KeGetCurrentThread() == NULL ||\r
-           FastMutex->Owner != KeGetCurrentThread());\r
-    ASSERT(KeGetCurrentIrql() == APC_LEVEL || \r
-    KeGetCurrentThread() == NULL || \r
-    KeGetCurrentThread()->KernelApcDisable);\r
-  \r
-    InterlockedIncrementUL(&FastMutex->Contention);\r
-    while (InterlockedExchange(&FastMutex->Count, 0) == 0)\r
-    {\r
-        KeWaitForSingleObject(&FastMutex->Gate,\r
-                              Executive,\r
-                              KernelMode,\r
-                              FALSE,\r
-                              NULL);\r
-    }\r
-    InterlockedDecrementUL(&FastMutex->Contention);\r
-    FastMutex->Owner = KeGetCurrentThread();\r
-}\r
-\r
-VOID\r
-FASTCALL\r
-CcReleaseBrokenMutexUnsafe(PFAST_MUTEX FastMutex)\r
-{\r
-    ASSERT(KeGetCurrentThread() == NULL ||\r
-           FastMutex->Owner == KeGetCurrentThread());\r
-    ASSERT(KeGetCurrentIrql() == APC_LEVEL || \r
-    KeGetCurrentThread() == NULL || \r
-    KeGetCurrentThread()->KernelApcDisable);\r
-  \r
-    FastMutex->Owner = NULL;\r
-    InterlockedExchange(&FastMutex->Count, 1);\r
-    if (FastMutex->Contention > 0)\r
-    {\r
-        KeSetEvent(&FastMutex->Gate, 0, FALSE);\r
-    }\r
-}\r
-\r
-VOID \r
-FASTCALL\r
-CcAcquireBrokenMutex(PFAST_MUTEX FastMutex)\r
-{\r
-    KeEnterCriticalRegion();\r
-    CcAcquireBrokenMutexUnsafe(FastMutex);\r
-}\r
-\r
-\r
-VOID\r
-FASTCALL\r
-CcReleaseBrokenMutex(PFAST_MUTEX FastMutex)\r
-{\r
-    CcReleaseBrokenMutexUnsafe(FastMutex);\r
-    KeLeaveCriticalRegion();\r
-}\r
-\r
-BOOLEAN\r
-FASTCALL\r
-CcTryToAcquireBrokenMutex(PFAST_MUTEX FastMutex)\r
-{\r
-    KeEnterCriticalRegion();\r
-    if (InterlockedExchange(&FastMutex->Count, 0) == 1)\r
-    {\r
-        FastMutex->Owner = KeGetCurrentThread();\r
-        return(TRUE);\r
-    }\r
-    else\r
-    {\r
-        KeLeaveCriticalRegion();\r
-        return(FALSE);\r
-    }\r
-}\r