uncomment and add mutex asserts
Modified: trunk/reactos/ntoskrnl/ex/fmutex.c
_____
Modified: trunk/reactos/ntoskrnl/ex/fmutex.c
--- trunk/reactos/ntoskrnl/ex/fmutex.c 2005-09-24 09:30:43 UTC (rev
18023)
+++ trunk/reactos/ntoskrnl/ex/fmutex.c 2005-09-24 11:43:23 UTC (rev
18024)
@@ -21,7 +21,11 @@
VOID FASTCALL
ExAcquireFastMutexUnsafe(PFAST_MUTEX FastMutex)
{
- //ASSERT(FastMutex->Owner != KeGetCurrentThread());
+ ASSERT(KeGetCurrentThread() == NULL || FastMutex->Owner !=
KeGetCurrentThread());
+ ASSERT(KeGetCurrentIrql() == APC_LEVEL ||
+ KeGetCurrentThread() == NULL ||
+ KeGetCurrentThread()->KernelApcDisable);
+
InterlockedIncrementUL(&FastMutex->Contention);
while (InterlockedExchange(&FastMutex->Count, 0) == 0)
{
@@ -41,7 +45,11 @@
VOID FASTCALL
ExReleaseFastMutexUnsafe(PFAST_MUTEX FastMutex)
{
- //ASSERT(FastMutex->Owner == KeGetCurrentThread());
+ ASSERT(KeGetCurrentThread() == NULL || FastMutex->Owner ==
KeGetCurrentThread());
+ ASSERT(KeGetCurrentIrql() == APC_LEVEL ||
+ KeGetCurrentThread() == NULL ||
+ KeGetCurrentThread()->KernelApcDisable);
+
FastMutex->Owner = NULL;
InterlockedExchange(&FastMutex->Count, 1);
if (FastMutex->Contention > 0)