mirror of
https://github.com/reactos/reactos.git
synced 2025-04-22 13:10:39 +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
|
VOID FASTCALL
|
||||||
ExAcquireFastMutexUnsafe(PFAST_MUTEX FastMutex)
|
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);
|
InterlockedIncrementUL(&FastMutex->Contention);
|
||||||
while (InterlockedExchange(&FastMutex->Count, 0) == 0)
|
while (InterlockedExchange(&FastMutex->Count, 0) == 0)
|
||||||
{
|
{
|
||||||
|
@ -41,7 +45,11 @@ ExAcquireFastMutexUnsafe(PFAST_MUTEX FastMutex)
|
||||||
VOID FASTCALL
|
VOID FASTCALL
|
||||||
ExReleaseFastMutexUnsafe(PFAST_MUTEX FastMutex)
|
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;
|
FastMutex->Owner = NULL;
|
||||||
InterlockedExchange(&FastMutex->Count, 1);
|
InterlockedExchange(&FastMutex->Count, 1);
|
||||||
if (FastMutex->Contention > 0)
|
if (FastMutex->Contention > 0)
|
||||||
|
|
Loading…
Reference in a new issue