InsertNodeFromHead

Inserts a node into a list.

Synopsis

void InsertNodeFromHead( List *l, Node *n )

Description

This procedure inserts a new node into a list. The order of nodes in a list is normally determined by their priority. The procedure compares the priority of the new node to the priorities of nodes currently in the list, beginning at the head of the list, and inserts the new node immediately after all nodes whose priority is higher. If the priorities of all the nodes in the list are higher, the node is added at the end of the list.

Arguments

l
A pointer to the list into which to insert the node.
n
A pointer to the node to insert.

Implementation

Folio call implemented in kernel folio V20.

Associated Files

list.h
ANSI C Prototype
clib.lib
ARM Link Library

Notes

To arrange the nodes in a list by a value or values other than priority, use UniversalInsertNode().

A node can only be included in one list.

See Also

AddHead(), AddTail(), RemHead(), RemNode(), RemTail(), InsertNodeFromTail(), UniversalInsertNode()