Bewerken

Delen via


NdisInitializeSListHead macro (ndis.h)

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

Syntax

void NdisInitializeSListHead(
  [in]  SListHead
);

Parameters

[in] SListHead

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.

Return value

None

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.

Requirements

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

See also

NdisInitializeNPagedLookasideList

NdisInterlockedPopEntrySList

NdisInterlockedPushEntrySList

NdisQueryDepthSList

NdisQueueIoWorkItem