IsListEmpty - NtDoc

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

_Must_inspect_result_
FORCEINLINE
BOOLEAN
NTAPI_INLINE
IsListEmpty(
    _In_ PLIST_ENTRY ListHead
    )
{
    return ListHead->Flink == ListHead;
}

#endif

View code on GitHub
// wdm.h

BOOLEAN IsListEmpty(
  [in] const LIST_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-islistempty)

IsListEmpty function

Description

The IsListEmpty routine indicates whether a doubly linked list of LIST_ENTRY structures is empty.

Parameters

ListHead [in]

Pointer to a LIST_ENTRY structure that represents the head of the list.

Return value

IsListEmpty returns TRUE if there are currently no entries in the list and FALSE otherwise.

Remarks

IsListEmpty returns TRUE if ListHead->Flink refers back to ListHead.

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

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

See also

InitializeListHead

RemoveEntryList

RemoveHeadList

RemoveTailList