mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 18:45:46 +00:00
Fix bug in gate code
svn path=/trunk/; revision=15942
This commit is contained in:
parent
c2167ebb58
commit
314e0eaf59
1 changed files with 3 additions and 6 deletions
|
@ -44,7 +44,7 @@ KeWaitForGate(PKGATE Gate,
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
/* Lock the APC Queue */
|
/* Lock the APC Queue */
|
||||||
KeAcquireSpinLock(&CurrentThread->ApcQueueLock, &OldIrql);
|
OldIrql = KeAcquireDispatcherDatabaseLock();
|
||||||
|
|
||||||
/* Check if it's already signaled */
|
/* Check if it's already signaled */
|
||||||
if (!Gate->Header.SignalState)
|
if (!Gate->Header.SignalState)
|
||||||
|
@ -53,7 +53,7 @@ KeWaitForGate(PKGATE Gate,
|
||||||
Gate->Header.SignalState = 0;
|
Gate->Header.SignalState = 0;
|
||||||
|
|
||||||
/* Unlock the Queue and return */
|
/* Unlock the Queue and return */
|
||||||
KeReleaseSpinLock(&CurrentThread->ApcQueueLock, OldIrql);
|
KeReleaseDispatcherDatabaseLock(OldIrql);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,9 +78,6 @@ KeWaitForGate(PKGATE Gate,
|
||||||
KiWakeQueue(CurrentThread->Queue);
|
KiWakeQueue(CurrentThread->Queue);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Unlock the Queue*/
|
|
||||||
KeReleaseSpinLock(&CurrentThread->ApcQueueLock, OldIrql);
|
|
||||||
|
|
||||||
/* Block the Thread */
|
/* Block the Thread */
|
||||||
DPRINT("Blocking the Thread: %x\n", CurrentThread);
|
DPRINT("Blocking the Thread: %x\n", CurrentThread);
|
||||||
KiBlockThread(&Status,
|
KiBlockThread(&Status,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue