Commit da4291df authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

ntoskrnl.exe: Implement KeAcquireSpinLockAtDpcLevel().

parent a1dfdfaf
......@@ -510,7 +510,7 @@
@ stub Ke386QueryIoAccessMap
@ stdcall Ke386SetIoAccessMap(long ptr)
@ stub KeAcquireInterruptSpinLock
@ stub KeAcquireSpinLockAtDpcLevel
@ stdcall KeAcquireSpinLockAtDpcLevel(ptr)
@ stdcall -arch=arm,arm64,x86_64 KeAcquireSpinLockRaiseToDpc(ptr)
@ stub KeAddSystemServiceTable
@ stub KeAreApcsDisabled
......
......@@ -396,6 +396,16 @@ static inline void small_pause(void)
}
/***********************************************************************
* KeAcquireSpinLockAtDpcLevel (NTOSKRNL.EXE.@)
*/
void WINAPI KeAcquireSpinLockAtDpcLevel( KSPIN_LOCK *lock )
{
TRACE("lock %p.\n", lock);
while (!InterlockedCompareExchangePointer( (void **)lock, (void *)1, (void *)0 ))
small_pause();
}
/***********************************************************************
* KeReleaseSpinLockFromDpcLevel (NTOSKRNL.EXE.@)
*/
void WINAPI KeReleaseSpinLockFromDpcLevel( KSPIN_LOCK *lock )
......
......@@ -1427,6 +1427,7 @@ void WINAPI KeAcquireSpinLock(KSPIN_LOCK*,KIRQL*);
#define KeAcquireSpinLock( lock, irql ) *(irql) = KeAcquireSpinLockRaiseToDpc( lock )
KIRQL WINAPI KeAcquireSpinLockRaiseToDpc(KSPIN_LOCK*);
#endif
void WINAPI KeAcquireSpinLockAtDpcLevel(KSPIN_LOCK*);
BOOLEAN WINAPI KeCancelTimer(KTIMER*);
void WINAPI KeClearEvent(PRKEVENT);
NTSTATUS WINAPI KeDelayExecutionThread(KPROCESSOR_MODE,BOOLEAN,LARGE_INTEGER*);
......
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