ExInterlockedPopEntryList - NtDoc

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

PSINGLE_LIST_ENTRY ExInterlockedPopEntryList(
  [in, out] PSINGLE_LIST_ENTRY ListHead,
  [in, out] PKSPIN_LOCK        Lock
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

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

ExInterlockedPopEntryList function

Description

The ExInterlockedPopEntryList routine atomically removes an entry from the beginning of a singly linked list of SINGLE_LIST_ENTRY structures.

Parameters

ListHead [in, out]

A pointer to the SINGLE_LIST_ENTRY structure that serves as the list header. The storage for ListHead must be resident at all IRQLs.

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.

Return value

ExInterlockedPopEntryList returns a pointer to the SINGLE_LIST_ENTRY structure removed from the list. If the list was empty, the routine returns NULL.

Remarks

ExInterlockedPopEntryList performs the same operation as PopEntryList, but atomically. Do not mix atomic and non-atomic calls on the same list.

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

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

See also

ExInitializeSListHead

ExInterlockedPopEntrySList

ExInterlockedPushEntryList

KeInitializeSpinLock

PopEntryList