mirror of
https://github.com/reactos/reactos.git
synced 2024-09-14 06:42:52 +00:00
Fix bug in gate code
svn path=/trunk/; revision=15942
This commit is contained in:
parent
c2167ebb58
commit
314e0eaf59
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue