NdisInitializeListHead macro (ndis.h)
The NdisInitializeListHead function initializes a doubly linked, driver-maintained queue.
Syntax
void NdisInitializeListHead(
[in] _ListHead
);
Parameters
[in] _ListHead
A pointer to driver-allocated nonpaged storage for the head of the interlocked queue or list.
Return value
None
Remarks
NdisInitializeListHead can be called from a MiniportInitializeEx function or from a protocol driver's DriverEntry routine if the driver queues requests internally. However, miniport drivers seldom set up internal queues because the NDIS library serializes requests and packets sent to miniport drivers.
Any NDIS driver that maintains an internal queue is responsible for synchronizing driver functions' accesses to queued entries. The NdisInterlockedXxxList functions ensure that only one driver function can access queued entries at any given moment, even if the driver is running on a multiprocessor computer, because the queue is protected by a caller-supplied spin lock.
For an interlocked queue, the driver also must provide nonpaged storage for a spin lock. It must initialize the spin lock with the NdisAllocateSpinLock function before passing a pointer to that spin lock to any of the NdisInterlockedXxxList functions.
Callers of NdisInitializeListHead can be running at any IRQL. If NdisInitializeListHead is called at IRQL >= DISPATCH_LEVEL the storage for ListHead must be resident.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Supported for NDIS 6.0 and NDIS 5.1 drivers (see NdisInitializeListHead (NDIS 5.1)) in Windows Vista. Supported for NDIS 5.1 drivers (see NdisInitializeListHead (NDIS 5.1)) in Windows XP. |
Target Platform | Desktop |
Header | ndis.h (include Ndis.h) |
IRQL | Any level (see Remarks section) |
See also
DriverEntry of NDIS Protocol Drivers
NdisInterlockedInsertHeadList NdisInterlockedInsertTailList NdisInterlockedRemoveHeadList