Get and set the priority of a task
Source position: exec.pas line 1910
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.