PushEntryList - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#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;
}

#endif

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

NtDoc

This function is documented in Windows Driver Kit.

Windows Driver Kit DDI reference (nf-wdm-pushentrylist)

PushEntryList function

Description

The PushEntryList routine inserts an entry at the beginning of a singly linked list of SINGLE_LIST_ENTRY structures.

Parameters

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.

Remarks

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.

See also

ExInterlockedPushEntryList

PopEntryList