ExInterlockedPushEntrySList macro

The ExInterlockedPushEntrySList routine atomically inserts an entry at the beginning of a sequenced singly linked list.

Syntax

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

Parameters

Head

Entry

Lock

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

None

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 ExInterlockedPushEntrySList.

The ExInterlockedPushEntrySList routine can be called at any IRQL. The storage for the ListHead parameter and the list entries must be resident at all IRQLs.

Requirements

   
Minimum supported client Available starting with Windows 2000.
Target Platform Universal
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL Any level (see Remarks section)

See Also

ExInitializeSListHead

ExInterlockedInsertTailList

ExInterlockedPopEntrySList

ExQueryDepthSList

KeInitializeSpinLock