Skip to content

TaskSetPriority

Sets a task's base priority.

Number Selector Blocking Since
0x0C SVC_MANAGETASK MNGTASK_SET_PRIORITY (2) no 2.0
Err TaskSetPriority(Handle h, uint32_t val);

Registers: (task, prio) -> r0 status

Higher numbers run first.

The effective priority can be higher while the task serves a call from a higher-priority caller (priority inheritance).

Parameters

Name Direction Description
h in Task handle with PERM_CNTL, or -1 for the caller.
val in New base priority.

Returns

ZUZU_OK, or an error code.

Errors

Error Condition
ERR_NOPERM val is above the caller's maximum or the task's maximum, or h lacks PERM_CNTL.
ERR_BADHANDLE h is not a live handle.
ERR_BADTYPE h is not a task.