Commit 05f5cce6 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

ntoskrnl.exe: Implement plain spinlock functions on top of DPC-level ones.

parent da4291df
......@@ -421,7 +421,7 @@ void WINAPI KeReleaseSpinLockFromDpcLevel( KSPIN_LOCK *lock )
void WINAPI KeReleaseSpinLock( KSPIN_LOCK *lock, KIRQL irql )
{
TRACE("lock %p, irql %u.\n", lock, irql);
InterlockedExchangePointer( (void **)lock, 0 );
KeReleaseSpinLockFromDpcLevel( lock );
}
/***********************************************************************
......@@ -430,8 +430,7 @@ void WINAPI KeReleaseSpinLock( KSPIN_LOCK *lock, KIRQL irql )
KIRQL WINAPI KeAcquireSpinLockRaiseToDpc( KSPIN_LOCK *lock )
{
TRACE("lock %p.\n", lock);
while (!InterlockedCompareExchangePointer( (void **)lock, (void *)1, (void *)0 ))
small_pause();
KeAcquireSpinLockAtDpcLevel( lock );
return 0;
}
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment