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

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2019-01-27 20:45:33 -06:00 committed by Alexandre Julliard
parent da4291dfc5
commit 05f5cce6c8
1 changed files with 2 additions and 3 deletions

View File

@ -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