Compartir a través de


NdisInitializeListHead (Compact 2013)

3/26/2014

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

Syntax

VOID NdisInitializeListHead(
  PLIST_ENTRY ListHead
);

Parameters

  • ListHead
    [in] Pointer to driver-allocated 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 rarely 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 NdisInterlocked..List functions make sure that only one driver function can access queued entries at any moment, even if the driver is running on a multiprocessor device, because the queue is protected by a caller-supplied spin lock.

For an interlocked queue, the driver must also 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 NdisInterlocked..List functions.

Requirements

Header

ndis.h

Library

ndis.lib

See Also

Reference

NDIS Interlocked Functions Interface
DriverEntry of NDIS Protocol Drivers
DriverEntry
MiniportInitializeEx
MiniportInitialize
NdisAllocateSpinLock
NdisInterlockedInsertHeadList
NdisInterlockedInsertTailList
NdisInterlockedRemoveHeadList