https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e312a40ae29a3aa9ba86a…
commit e312a40ae29a3aa9ba86a3e1122348ff112c1499
Author: Jérôme Gardou <jerome.gardou(a)reactos.org>
AuthorDate: Wed May 26 17:05:15 2021 +0200
Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com>
CommitDate: Tue Jun 29 11:49:20 2021 +0200
[NTOS:KE] Implement KeAcquireInStackQueuedSpinLockForDpc &
KeReleaseInStackQueuedSpinLockForDpc
---
ntoskrnl/ke/spinlock.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/ntoskrnl/ke/spinlock.c b/ntoskrnl/ke/spinlock.c
index c6e44a21c0c..6648f75e5a9 100644
--- a/ntoskrnl/ke/spinlock.c
+++ b/ntoskrnl/ke/spinlock.c
@@ -413,25 +413,32 @@ KeReleaseSpinLockForDpc(IN PKSPIN_LOCK SpinLock,
}
/*
- * @unimplemented
+ * @implemented
*/
VOID
FASTCALL
KeAcquireInStackQueuedSpinLockForDpc(IN PKSPIN_LOCK SpinLock,
IN PKLOCK_QUEUE_HANDLE LockHandle)
{
- UNIMPLEMENTED;
- return;
+ LockHandle->OldIrql = KeGetCurrentIrql();
+ if (LockHandle->OldIrql >= DISPATCH_LEVEL)
+ KeAcquireInStackQueuedSpinLockAtDpcLevel(SpinLock, LockHandle);
+ else
+ KeAcquireInStackQueuedSpinLock(SpinLock, LockHandle);
}
/*
- * @unimplemented
+ * @implemented
*/
VOID
FASTCALL
KeReleaseInStackQueuedSpinLockForDpc(IN PKLOCK_QUEUE_HANDLE LockHandle)
{
- UNIMPLEMENTED;
+ if (LockHandle->OldIrql >= DISPATCH_LEVEL)
+ KeReleaseInStackQueuedSpinLockFromDpcLevel(LockHandle);
+ else
+ KeReleaseInStackQueuedSpinLock(LockHandle);
+
}
/*