NdisInterlockedPushEntrySList macro (ndis.h)

The NdisInterlockedPushEntrySList function inserts an entry at the head of a sequenced, singly linked list.

Syntax

void NdisInterlockedPushEntrySList(
        SListHead,
        SListEntry,
  [in]  Lock
);

Parameters

SListHead

A pointer to the head of the already initialized sequenced, singly linked list into which the specified entry is to be inserted.

SListEntry

A pointer to the entry to be inserted.

[in] Lock

A pointer to a caller-supplied spin lock, not currently held by the caller.

Return value

None

Remarks

Before the driver's initial call the NdisInterlockedPushEntrySList function, it must initialize the list head with the NdisInitializeSListHead function.

A driver must not be holding the given Lock when it calls NdisInterlockedPushEntrySList. If necessary, a driver must call the NdisReleaseSpinLock function before calling NdisInterlockedPushEntrySList. NdisInterlockedPushEntrySList must acquire this lock itself before it inserts ListEntry at the head of the list to ensure that this operation is handled in a multiprocessor-safe way.

The caller must provide resident storage for the Lock, which must be initialized with the NdisAllocateSpinLock function before the initial call to any NdisInterlocked..SList routine.

Drivers that retry I/O operations should use a doubly linked interlocked queue and the NdisInterlockedInsert/Remove..List functions, instead of an S-List.

If NdisInterlockedPushEntrySList is called at IRQL >= DISPATCH_LEVEL, the storage for the ListHead parameter and the list entries must be resident

Requirements

Requirement Value
Minimum supported client Supported for NDIS 6.0 and NDIS 5.1 drivers (see NdisInterlockedPushEntrySList (NDIS 5.1)) in Windows Vista. Supported for NDIS 5.1 drivers (see NdisInterlockedPushEntrySList (NDIS 5.1)) in Windows XP.
Target Platform Desktop
Header ndis.h (include Ndis.h)
IRQL Any level

See also

NdisAllocateSpinLock

NdisFreeSpinLock

NdisInitializeSListHead

NdisInterlockedPopEntrySList

NdisQueryDepthSList

NdisReleaseSpinLock