Home  /  Autodocs  /  exec.library

NAME

SetTaskPri
get and set the priority of a Task

SYNOPSIS

oldPriority = SetTaskPri(task, priority)
D0-0:8 A1 D0-0:8

BYTE SetTaskPri(struct Task *,BYTE);

FUNCTION

This function changes the priority of a Task regardless of its state. The old priority of the Task is returned. A reschedule is performed, and a context switch may result.

To change the priority of the currently running Task, pass the result of FindTask(NULL); as the Task pointer.

INPUTS

task
Task to be affected

priority
the new priority for the Task, in the range -128..127

RESULT

oldPriority
the Tasks previous priority

SEE ALSO

FindTask()