[SDK:NT] Even more list helpers

Added InsertHeadList() and InsertTailList()
This commit is contained in:
Quinn Stephens 2024-08-27 09:20:10 -04:00
parent 831a676af8
commit 6a868b45ba

View File

@ -260,6 +260,66 @@ Return Value:
Head->Flink = Head;
}
FORCEINLINE
VOID
InsertHeadList (
IN PLIST_ENTRY Head,
IN PLIST_ENTRY Entry
)
/*++
Routine Description:
Inserts a list entry at the head of a list.
Arguments:
Entry - The list entry.
Return Value:
None.
--*/
{
Entry->Flink = Head->Flink;
Entry->Blink = Head;
Head->Flink->Blink = Entry;
Head->Flink = Entry;
}
FORCEINLINE
VOID
InsertTailList (
IN PLIST_ENTRY Head,
IN PLIST_ENTRY Entry
)
/*++
Routine Description:
Inserts a list entry at the tail of a list.
Arguments:
Entry - The list entry.
Return Value:
None.
--*/
{
Entry->Blink = Head->Blink;
Entry->Flink = Head;
Head->Blink->Flink = Entry;
Head->Blink = Entry;
}
FORCEINLINE
BOOLEAN
RemoveEntryList (