The ExInterlockedPopEntrySList routine removes the first entry from a sequenced, singly linked list so that access to this queue is synchronized in a multiprocessor-safe way.
PSINGLE_LIST_ENTRY
ExInterlockedPopEntrySList(
IN PSLIST_HEADER ListHead,
IN PKSPIN_LOCK Lock
);
ExInterlockedPopEntrySList returns a pointer to the first entry in the list. If the list was empty, it returns NULL.
Declared in wdm.h and ntddk.h. Include wdm.h or ntddk.h.
ExInterlockedPopEntrySList removes the entry at the head of the list. Before calling this routine, the list must be initialized with ExInitializeSListHead and one or more caller-allocated entries should be inserted with ExInterlockedPushEntrySList.
Drivers that retry I/O operations should use a doubly linked interlocked queue and the ExInterlockedInsert/Remove..List routines, rather than an S-List.
The caller must provide resident storage for the Lock, which must be initialized with KeInitializeSpinLock before the first call to ExInterlockedPushEntrySList. A caller must not be holding this spin lock when it calls ExInterlockedPush/PopEntrySList.
Callers of ExInterlockedPopEntrySList can be running at IRQL <= DISPATCH_LEVEL.
ExInitializeSListHead, ExInterlockedRemoveHeadList, ExInterlockedPushEntrySList, ExQueryDepthSList, KeInitializeSpinLock