Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +- dlls/ntoskrnl.exe/sync.c | 11 ++++++++++- include/ddk/wdm.h | 1 + 3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec index 28794d16de..e861000f26 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec +++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec @@ -594,7 +594,7 @@ @ stdcall KeReleaseMutex(ptr long) @ stdcall KeReleaseSemaphore(ptr long long long) @ stdcall -arch=arm,arm64,x86_64 KeReleaseSpinLock(ptr long) -@ stub KeReleaseSpinLockFromDpcLevel +@ stdcall KeReleaseSpinLockFromDpcLevel(ptr) @ stub KeRemoveByKeyDeviceQueue @ stub KeRemoveByKeyDeviceQueueIfBusy @ stub KeRemoveDeviceQueue diff --git a/dlls/ntoskrnl.exe/sync.c b/dlls/ntoskrnl.exe/sync.c index 475fcf1804..b439695fd7 100644 --- a/dlls/ntoskrnl.exe/sync.c +++ b/dlls/ntoskrnl.exe/sync.c @@ -386,7 +386,6 @@ void WINAPI KeInitializeSpinLock( KSPIN_LOCK *lock ) *lock = 0; }
-#ifndef __i386__ static inline void small_pause(void) { #ifdef __x86_64__ @@ -396,6 +395,16 @@ static inline void small_pause(void) #endif }
+/*********************************************************************** + * KeReleaseSpinLockFromDpcLevel (NTOSKRNL.EXE.@) + */ +void WINAPI KeReleaseSpinLockFromDpcLevel( KSPIN_LOCK *lock ) +{ + TRACE("lock %p.\n", lock); + InterlockedExchangePointer( (void **)lock, 0 ); +} + +#ifndef __i386__ /*********************************************************************** * KeReleaseSpinLock (NTOSKRNL.EXE.@) */ diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h index ccaf5feb57..908e71c72d 100644 --- a/include/ddk/wdm.h +++ b/include/ddk/wdm.h @@ -1471,6 +1471,7 @@ BOOLEAN WINAPI KeRegisterBugCheckReasonCallback(KBUGCHECK_REASON_CALLBACK_RECO LONG WINAPI KeReleaseMutex(PRKMUTEX,BOOLEAN); LONG WINAPI KeReleaseSemaphore(PRKSEMAPHORE,KPRIORITY,LONG,BOOLEAN); void WINAPI KeReleaseSpinLock(KSPIN_LOCK*,KIRQL); +void WINAPI KeReleaseSpinLockFromDpcLevel(KSPIN_LOCK*); LONG WINAPI KeResetEvent(PRKEVENT); LONG WINAPI KeSetEvent(PRKEVENT,KPRIORITY,BOOLEAN); KPRIORITY WINAPI KeSetPriorityThread(PKTHREAD,KPRIORITY);