SetNodePri

Changes the priority of a list node.

Synopsis

uint8 SetNodePri( Node *n, uint8 newpri )

Description

This procedure changes the priority of a node in a list. The kernel arranges lists by priority, with higher-priority nodes coming before lower-priority nodes. When the priority of a node changes, the kernel automatically rearranges the list to reflect the new priority. The node is moved immediately before the first node whose priority is lower.

Arguments

n
A pointer to the node whose priority to change.
newpri
The new priority for the node. This can be a value from 0 to 255.

Return Value

The procedure returns the previous priority of the node.

Implementation

Folio call implemented in kernel folio V20.

Associated Files

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

Caveats

GIGO (garbage in, garbage out)

See Also

InsertNodeFromHead(), InsertNodeFromTail(), UniversalInsertNode()