Changing the Priority of a Node


List nodes are often ordered by priority. You can change the priority of a list node (and thereby change its position in the list) by using the SetNodePri() function:

uint8 SetNodePri( Node *n, uint8 newpri )
The n argument is a pointer to the list node whose priority you want to change. The newpri argument specifies the new priority for the node (a value from 0 to 255). The function returns the previous priority of the node. When you change the priority of a node, the kernel automatically moves the node immediately.