ExInterlockedPopEntrySList - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdm.h

NTKERNELAPI
PSLIST_ENTRY
FASTCALL
ExInterlockedPopEntrySList (
    _Inout_ PSLIST_HEADER ListHead,
    _Inout_opt_ _Requires_lock_not_held_(*_Curr_) PKSPIN_LOCK Lock
    );

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdm-exinterlockedpopentryslist)

ExInterlockedPopEntrySList macro

Description

The ExInterlockedPopEntrySList routine atomically removes the first entry from a sequenced singly linked list.

Parameters

ListHead [in, out]

A pointer to the SLIST_HEADER structure that serves as the header for the sequenced singly linked list. ListHead must have been initialized by calling ExInitializeSListHead.

Lock [in, out]

A pointer to a KSPIN_LOCK structure that serves as the spin lock used to synchronize access to the list. The storage for the spin lock must be resident and must have been initialized by calling KeInitializeSpinLock. You must use this spin lock only with the ExInterlockedXxxList routines.

Syntax

NTKERNELAPI
PSLIST_ENTRY
FASTCALL
ExInterlockedPopEntrySList (
    _Inout_ PSLIST_HEADER ListHead,
    _Inout_opt_ _Requires_lock_not_held_(*_Curr_) PKSPIN_LOCK Lock
    );

Return value

ExInterlockedPopEntrySList returns a pointer to the first SLIST_ENTRY structure on the list. If the list was empty, the routine returns NULL.

Remarks

For more information about using this routine to implement a sequenced singly linked list, see Singly and Doubly Linked Lists.

On Windows 2000, drivers must use the -D_WIN2K_COMPAT_SLIST_USAGE switch to successfully link code that uses ExInterlockedPopEntrySList.

ExInterlockedPopEntrySList can be called at any IRQL. The storage for the ListHead parameter must be resident at all IRQLs.

See also

ExInitializeSListHead

ExInterlockedPushEntrySList

ExInterlockedRemoveHeadList

ExQueryDepthSList

KeInitializeSpinLock