[Overview][Constants][Types][Procedures and functions][Index] Reference for unit 'Exec' (#aros)

SetTaskPri

Get and set the priority of a task

Declaration

Source position: exec.pas line 1258

function SetTaskPri(

  Task: PTask;

  Priority: LongInt

):ShortInt;

Arguments

Task

  

Task to be affected

Priority

  

The new priority for the task (-127 to 5).

Function result

The tasks previous priority

Description

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.


Documentation generated on: 2017-01-10