ExInterlockedPopEntrySList

PSINGLE_LIST_ENTRY
    ExInterlockedPopEntrySList(

        IN PSLIST_HEADER  ListHead,
        IN PKSPIN_LOCK  Lock
        );

ExInterlockedPopEntrySList removes the first entry from a sequenced, singly linked list so access to the list is synchronized in a multiprocessor-safe way.

Parameters

ListHead
Points to the head of the sequenced, singly linked list into which the specified entry is to be inserted.
Lock
Points to a caller-supplied spin lock.

Return Value

ExInterlockedPopEntrySList returns a pointer to the first entry in the list. If the list was empty, this routine returns NULL.

Comments

ExInterlockedPopEntrySList removes the entry at the head of the list. Prior to calling this routine, the list should be initialized with ExInitializeSListHead.

The caller must provide resident storage for the Lock, which must be initialized with KeInitializeSpinLock before the initial call to an ExInterlocked..SList routine. The spin lock is not used on platforms that support an 8-byte compare exchange operation, but the spin lock must be provided on any ExInterlocked..SList call.

Callers of ExInterlockedPopEntrySList should be running at IRQL <= DISPATCH_LEVEL.

See Also

ExInitializeSListHead, ExInterlockedPushEntrySList, ExQueryDepthSListHead, KeInitializeSpinLock