The RemoveTailList routine removes an entry from the end of a doubly linked list of LIST_ENTRY structures.
PLIST_ENTRY RemoveTailList( PLIST_ENTRY ListHead );
Pointer to the LIST_ENTRY structure that serves as the list header.
RemoveTailList returns a pointer to the entry that was at the tail of the list. If the list is empty, RemoveTailList returns ListHead.
RemoveTailList removes the last entry from the list by setting ListHead->Blink to point to the second-to-last entry in the list. The routine sets the Flink member of the new first entry to ListHead. In the event the list is empty, this is effectively a no-op.
For information about using this routine when implementing a doubly linked list, see Singly and Doubly Linked Lists.
Callers of InsertHeadList can be running at any IRQL. If InsertHeadList is called at IRQL >= DISPATCH_LEVEL, the storage for ListHead and the list entries must be resident.
|Minimum supported client||Available starting with Windows 2000.|
|Header||wdm.h (include Wdm.h, Ntddk.h, Ntifs.h, Wudfwdm.h)|
|IRQL||Any level (See Remarks section)|