mirror of
https://github.com/reactos/reactos.git
synced 2025-04-19 20:19:26 +00:00
uncomment and add mutex asserts
svn path=/trunk/; revision=18024
This commit is contained in:
parent
f9725315fe
commit
bd79c96a7d
1 changed files with 10 additions and 2 deletions
|
@ -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 @@ ExAcquireFastMutexUnsafe(PFAST_MUTEX FastMutex)
|
|||
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)
|
||||
|
|
Loading…
Reference in a new issue