|This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.|
This function initializes any doubly-linked, driver-managed interlocked queue or doubly-linked, driver-maintained list.
VOID InitializeListHead( IN PLIST_ENTRY ListHead );
This function must be called from the DriverEntryfunction if a driver sets up internal interlocked queues for IRPs or manages internal linked lists.
The ListHeadof type LIST_ENTRY is doubly linked. Entries in an interlocked queue can be queued and dequeued by calling the ExInterlockedInsert XXXListand ExInterlockedRemoveHeadListfunctions. Entries can be inserted into and removed from a driver-maintained list with Insert XXXListand Remove XXXList.
For an interlocked queue, a driver must provide resident storage in the device extension of a driver-created device object, in the controller extension of a driver-created controller object, or in nonpaged pool allocated by the driver. The driver must also provide storage for a spin lock, which must be initialized with the KeInitializeSpinLockfunction before the driver's initial call to the ExInterlocked XXXfunction with the spin lock.
For a driver-maintained list, the driver must synchronize access to the list so that it is impossible for any two routines to be inserting and/or removing entries from the list simultaneously in symmetric multiprocessing devices. Consequently, most drivers use the ExInterlocked XXXfunctions to manage the necessary synchronization, rather than setting up a driver-managed list, which is likely to require spin-lock protection, anyway.
A driver that calls this function must be running at IRQL PASSIVE_LEVEL.
|Runs on||Versions||Defined in||Include||Link to|
|Windows CE OS||2.0 and later||Ntcompat.h|
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
Last updated on Tuesday, July 13, 2004