#ifndef _NTRTL_H
FORCEINLINE
VOID
NTAPI_INLINE
PushEntryList(
_Inout_ PSINGLE_LIST_ENTRY ListHead,
_Inout_ __drv_aliasesMem PSINGLE_LIST_ENTRY Entry
)
{
Entry->Next = ListHead->Next;
ListHead->Next = Entry;
}
View code on GitHub
// wdm.h
VOID PushEntryList(
[in, out] PSINGLE_LIST_ENTRY ListHead,
[in, out] __drv_aliasesMem PSINGLE_LIST_ENTRY Entry
);
View the official Windows Driver Kit DDI reference
This function is documented in Windows Driver Kit.
The PushEntryList routine inserts an entry at the beginning of a singly linked list of SINGLE_LIST_ENTRY structures.
ListHead
[in, out]Pointer to the SINGLE_LIST_ENTRY structure that serves as the list header.
Entry
[in, out]Pointer to SINGLE_LIST_ENTRY structure that represents the entry to be inserted on the list.
PushEntryList sets ListHead->Next to Entry, and Entry->Next to point to the old first entry of the list.
For information about using this routine when implementing a singly linked list, see Singly and Doubly Linked Lists.
Callers of PushEntryList can be running at any IRQL. If PushEntryList is called at IRQL >= DISPATCH_LEVEL, the storage for ListHead and the list entries must be resident.