mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 18:52:57 +00:00
Fix the check for an empty list.
svn path=/trunk/; revision=20884
This commit is contained in:
parent
68151ba039
commit
aab50d9dd5
1 changed files with 3 additions and 1 deletions
|
@ -287,6 +287,8 @@ KiInsertQueueApc(PKAPC Apc,
|
||||||
PKAPC QueuedApc;
|
PKAPC QueuedApc;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
|
ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL);
|
||||||
|
|
||||||
/* Acquire the lock (only needed on MP) */
|
/* Acquire the lock (only needed on MP) */
|
||||||
KeAcquireSpinLockAtDpcLevel(&Thread->ApcQueueLock);
|
KeAcquireSpinLockAtDpcLevel(&Thread->ApcQueueLock);
|
||||||
|
|
||||||
|
@ -790,7 +792,7 @@ KiDeliverApc(KPROCESSOR_MODE DeliveryMode,
|
||||||
ApcListEntry = Thread->ApcState.ApcListHead[UserMode].Flink;
|
ApcListEntry = Thread->ApcState.ApcListHead[UserMode].Flink;
|
||||||
|
|
||||||
/* Is it empty now? */
|
/* Is it empty now? */
|
||||||
if (!ApcListEntry)
|
if (ApcListEntry == &Thread->ApcState.ApcListHead[UserMode])
|
||||||
{
|
{
|
||||||
/* Release the lock and return */
|
/* Release the lock and return */
|
||||||
KeReleaseSpinLock(&Thread->ApcQueueLock, OldIrql);
|
KeReleaseSpinLock(&Thread->ApcQueueLock, OldIrql);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue