NdisInitializeSListHead - NtDoc

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

void NdisInitializeSListHead(
  [in] SListHead
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-ndis-ndisinitializeslisthead)

NdisInitializeSListHead macro

Description

The NdisInitializeSListHead function initializes the head of a sequenced, interlocked, singly linked list.

Parameters

SListHead [in]

A pointer to the caller-supplied list head to be initialized, which must be in resident memory. The structure must be 16-byte aligned on 64-bit platforms.

Remarks

NdisInitializeSListHead zero-initializes the opaque list head at SListHead and sets the first-entry pointer to NULL.

The sequence number in an S-List is incremented each time an entry is inserted to, or removed from, the list.

All entries in an S-List must be nonpaged.

Any driver that uses an S-List must provide a spin lock to the NdisInterlockedPushEntrySList and NdisInterlockedPopEntrySList functions. Before its initial call to either of these functions, the driver must initialize the spin lock with the NdisAllocateSpinLock function. To prevent deadlocks, the driver must not be holding this spin lock when it makes subsequent calls to NdisInterlockedPushEntrySList and NdisInterlockedPopEntrySList.

To manage a pool of fixed-size entries from nonpaged memory, consider using a lookaside list instead of an S-List.

Drivers that retry I/O operations should use a doubly linked interlocked queue and the NdisInterlockedInsertHeadList, NdisInterlockedInsertTailList, and NdisInterlockedRemoveHeadList functions, rather than an S-List.

If NdisInitializeSListHead is called at IRQL >= DISPATCH_LEVEL, the storage for the SListHead parameter must be resident.

See also

NdisInitializeNPagedLookasideList

NdisInterlockedPopEntrySList

NdisInterlockedPushEntrySList

NdisQueryDepthSList

NdisQueueIoWorkItem