The CHANGE_PRIORITY call

CHANGE_PRIORITY allows the issuing task to change its own priority. It cannot be used to change the priority of another task. This command causes the issuing task to release control, and so provide other tasks with the opportunity to run.

CHANGE_PRIORITY

DFHDSATX [CALL,]
      [CLEAR,]
      [IN,
      FUNCTION(CHANGE_PRIORITY),
      PRIORITY(name1 | (Rn) | decimalint | literalconst),]
      [OUT,
      [OLD_PRIORITY(name1 | (Rn)),]
      RESPONSE(name1 | *),
      REASON(name1 | *)]

This command is threadsafe.

OLD_PRIORITY(name1 | (Rn))
returns the previous priority of the issuing task.
name1
The name of a 1-byte field where the task’s previous priority is stored
(Rn)
A register in which the low-order byte receives the previous priority value and the other bytes are set to zero.
PRIORITY(name1 | (Rn) | decimalint | literalconst)
specifies the new priority to be assigned to the issuing task.
name1
The name of a 1-byte field, with a value in the range 0 through 255.
(Rn)
A register with the low-order byte containing the new priority value.
decimalint
A decimal integer not exceeding 255 in value. Neither an expression nor hexadecimal notation is allowed.
literalconst
A number in the form of a literal, for example B'00000000', X'FF', X'FCF4', "0" or an equate symbol with a similar value.

RESPONSE and REASON values for CHANGE_PRIORITY

RESPONSE REASON
OK None
DISASTER None
INVALID None
KERNERROR None
Note: For more detail, refer to the explanation of RESPONSE and REASON in Making an XPI call.