NdisInitializeListHead - NtDoc

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

void NdisInitializeListHead(
  [in] _ListHead
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

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

NdisInitializeListHead macro

Description

The NdisInitializeListHead function initializes a doubly linked, driver-maintained queue.

Parameters

_ListHead [in]

A pointer to driver-allocated nonpaged storage for the head of the interlocked queue or list.

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.

See also

DriverEntry of NDIS Protocol Drivers

MiniportInitializeEx

NdisAllocateSpinLock

NdisInterlockedInsertHeadList

NdisInterlockedInsertTailList

NdisInterlockedRemoveHeadList