The ExInterlockedPushEntrySList routine inserts an entry at the head of a sequenced, singly linked list so that access to the queue is synchronized in a multiprocessor-safe way.
PSINGLE_LIST_ENTRY
ExInterlockedPushEntrySList(
IN PSLIST_HEADER ListHead,
IN PSINGLE_LIST_ENTRY ListEntry,
IN PKSPIN_LOCK Lock
);
ExInterlockedPushEntrySList returns a pointer to the previous first entry in the list, if any. If the list was empty, it returns NULL.
Declared in wdm.h and ntddk.h. Include wdm.h or ntddk.h.
ExInterlockedPushEntrySList inserts ListEntry at the head of the list. Before each call to this routine, the caller either allocates the entry to be inserted or reinserts an entry obtained from a preceding call to ExInterlockedPopEntrySList. All entries in a sequenced, singly linked interlocked queue must be allocated from nonpaged pool.
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 ListHead and Lock, which must be initialized before the first call to ExInterlockedPushSList. A caller must not be holding this spin lock when it calls ExInterlockedPush/PopEntrySList routine.
Callers of ExInterlockedPushEntrySList should be running at IRQL <= DISPATCH_LEVEL.
ExInitializeSListHead, ExInterlockedInsertTailList, ExInterlockedPopEntrySList, ExQueryDepthSList, KeInitializeSpinLock