InitializeListHead - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTRTL_H

FORCEINLINE
VOID
NTAPI_INLINE
InitializeListHead(
    _Out_ PLIST_ENTRY ListHead
    )
{
    ListHead->Flink = ListHead->Blink = ListHead;
}

#endif

View code on GitHub
// wdm.h

VOID InitializeListHead(
  [out] PLIST_ENTRY ListHead
);

View the official Windows Driver Kit DDI reference

NtDoc

This function is documented in Windows Driver Kit.

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

InitializeListHead function

Description

The InitializeListHead routine initializes a LIST_ENTRY structure that represents the head of a doubly linked list.

Parameters

ListHead [out]

Pointer to a LIST_ENTRY structure that serves as the list header.

Remarks

The InitializeListHead routine sets the Flink and Blink members of ListHead to point to ListHead.

For information about using this routine when implementing a doubly linked list, see Singly and Doubly Linked Lists.

Callers of InitializeListHead can be running at any IRQL. If InitializeListHead is called at IRQL >= DISPATCH_LEVEL the storage for ListHead must be resident.

See also

ExInterlockedInsertHeadList

ExInterlockedInsertTailList

ExInterlockedPopEntryList

ExInterlockedPushEntryList

ExInterlockedRemoveHeadList

InsertHeadList

InsertTailList

IsListEmpty

KeInitializeSpinLock

PopEntryList

PushEntryList

RemoveEntryList

RemoveHeadList

RemoveTailList