[NTOSKRNL]
authorAmine Khaldi <amine.khaldi@reactos.org>
Fri, 14 May 2010 18:40:23 +0000 (18:40 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Fri, 14 May 2010 18:40:23 +0000 (18:40 +0000)
- Fix ExInterlockedPopEntryList and ExInterlockedPushEntryList, they were not working at all. Brought to you by Timo ;)

svn path=/branches/header-work/; revision=47201

ntoskrnl/ex/fastinterlck.c

index e98400a..d16968a 100644 (file)
@@ -255,7 +255,7 @@ ExInterlockedPopEntryList(IN PSINGLE_LIST_ENTRY ListHead,
     KIRQL OldIrql;
     PSINGLE_LIST_ENTRY OldHead = NULL;
     KeAcquireSpinLock(Lock, &OldIrql);
-    if (!ListHead->Next) OldHead = PopEntryList(ListHead);
+    OldHead = PopEntryList(ListHead);
     KeReleaseSpinLock(Lock, OldIrql);
     return OldHead;
 }
@@ -269,7 +269,8 @@ ExInterlockedPushEntryList(IN PSINGLE_LIST_ENTRY ListHead,
     KIRQL OldIrql;
     PSINGLE_LIST_ENTRY OldHead = NULL;
     KeAcquireSpinLock(Lock, &OldIrql);
-    if (!ListHead->Next) OldHead = PushEntryList(ListHead, ListEntry);
+    OldHead = ListHead->Next;
+    PushEntryList(ListHead, ListEntry);
     KeReleaseSpinLock(Lock, OldIrql);
     return OldHead;
 }