NdisInterlockedInsertTailList
This function inserts an entry, usually a packet, at the tail of a doubly linked list so that access to the list is synchronized in a multiprocessor-safe way.
PLIST_ENTRY NdisInterlockedInsertTailList(
IN PLIST_ENTRY ListHead,
IN PLIST_ENTRY ListEntry,
IN PNDIS_SPIN_LOCK SpinLock );
Parameters
- ListHead
Pointer to the head of the doubly linked list into which an entry is to be inserted. - ListEntry
Pointer to the entry to be inserted at the end of the list. - SpinLock
Pointer to a caller-supplied spin lock used to synchronize access to the list.
Return Values
Returns a pointer to the entry that was at the tail of the queue before the specified entry was inserted. If the queue was empty, it returns NULL.
Remarks
Before calling this function, a driver must initialize the variable at ListHead with the NdisInitializeListHead function and the variable at SpinLock with the NdisAllocateSpinLock function. The driver must also provide resident storage for these variables and for its internal queue.
The caller-supplied spin lock prevents any other function from accessing the driver's internal queue while this function is inserting the specified entry, even when the driver is running on a multiprocessor machine.
To convert a returned value back to the address of the inserted entry, a driver can use the CONTAINING_RECORD macro.
Requirements
| Runs on | Versions | Defined in | Include | Link to |
|---|---|---|---|---|
| Windows CE OS | 2.0 and later | Ndis.h | Ndislib.lib |
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.
See Also
NdisAllocateSpinLock, NdisInitializeListHead, NdisInterlockedInsertHeadList, NdisInterlockedRemoveHeadList
Last updated on Tuesday, July 13, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.