mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
Fix bug in gate code
svn path=/trunk/; revision=15942
This commit is contained in:
@@ -44,8 +44,8 @@ KeWaitForGate(PKGATE Gate,
|
||||
do
|
||||
{
|
||||
/* Lock the APC Queue */
|
||||
KeAcquireSpinLock(&CurrentThread->ApcQueueLock, &OldIrql);
|
||||
|
||||
OldIrql = KeAcquireDispatcherDatabaseLock();
|
||||
|
||||
/* Check if it's already signaled */
|
||||
if (!Gate->Header.SignalState)
|
||||
{
|
||||
@@ -53,7 +53,7 @@ KeWaitForGate(PKGATE Gate,
|
||||
Gate->Header.SignalState = 0;
|
||||
|
||||
/* Unlock the Queue and return */
|
||||
KeReleaseSpinLock(&CurrentThread->ApcQueueLock, OldIrql);
|
||||
KeReleaseDispatcherDatabaseLock(OldIrql);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -78,9 +78,6 @@ KeWaitForGate(PKGATE Gate,
|
||||
KiWakeQueue(CurrentThread->Queue);
|
||||
}
|
||||
|
||||
/* Unlock the Queue*/
|
||||
KeReleaseSpinLock(&CurrentThread->ApcQueueLock, OldIrql);
|
||||
|
||||
/* Block the Thread */
|
||||
DPRINT("Blocking the Thread: %x\n", CurrentThread);
|
||||
KiBlockThread(&Status,
|
||||
|
||||
Reference in New Issue
Block a user