Skip to content

TaskSetTimeSlice

Sets how long a task runs before same-priority tasks get a turn.

Number Selector Blocking Since
0x0C SVC_MANAGETASK MNGTASK_SET_TIMESLICE (4) no 2.0
Err TaskSetTimeSlice(Handle h, uint32_t slice_us);

Registers: (task, slice_us) -> r0 status

Parameters

Name Direction Description
h in Task handle with PERM_CNTL, or -1 for the caller.
slice_us in Slice length in microseconds, within [TIMESLICE_MIN_US, TIMESLICE_MAX_US].

Returns

ZUZU_OK, or an error code.

Errors

Error Condition
ERR_BADARG slice_us is out of range.
ERR_BADHANDLE h is not a live handle.
ERR_BADTYPE h is not a task.
ERR_NOPERM h lacks PERM_CNTL.