Get and set the priority of a task
Source position: exec.pas line 1261
function SetTaskPri( |
Task: PTask; |
Priority: LongInt |
):ShortInt; |
Task |
|
Task to be affected |
Priority |
|
The new priority for the task (-127 to 5). |
The tasks previous priority
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(nil); as the task pointer.