NdisInitializeListHead

Windows CE .NET

This function initializes a doubly linked, driver-maintained interlocked queue or doubly linked list.

VOID NdisInitializeListHead(
  PLIST_ENTRY ListHead
);

Parameters

ListHead
[in] Pointer to driver-allocated storage for the head of the interlocked queue or list.

Return Values

None.

Remarks

This function can be called from a MiniportInitialize function or from a protocol driver's Initialization of NDIS Protocol Drivers functions if the driver queues requests internally. However, miniport drivers seldom set up internal queues because the NDIS library serializes requests and packets sent to miniports.

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 moment, even if the driver is running on a multiprocessor machine, because the queue is protected by a caller-supplied spin lock.

For an interlocked queue, the driver must also provide storage for a spin lock. It must initialize the spin lock with NdisAllocateSpinLock before passing a pointer to that spin lock to any of the NdisInterlockedXXXList functions.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Ndis.h.

See Also

Initialization of NDIS Protocol Drivers | MiniportInitialize | NdisAllocateSpinLock | NdisInterlockedInsertHeadList | NdisInterlockedInsertTailList | NdisInterlockedRemoveHeadList


 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.

Show: