TaskSuspend¶
Stops a task until TaskResume().
| Number | Selector | Blocking | Since |
|---|---|---|---|
0x0C SVC_MANAGETASK |
MNGTASK_SUSPEND (5) |
no | 2.0 |
Err TaskSuspend(Handle h);
Registers: (task) -> r0 status
A task blocked in a syscall stays blocked; if it is woken while suspended, its result is delivered but it does not run until resumed. A task may suspend itself. Suspending twice is not an error.
Parameters¶
| Name | Direction | Description |
|---|---|---|
h |
in | Task handle with PERM_CNTL. |
Returns¶
ZUZU_OK, or an error code.
Errors¶
| Error | Condition |
|---|---|
ERR_BADHANDLE |
h is not a live handle. |
ERR_BADTYPE |
h is not a task. |
ERR_NOPERM |
h lacks PERM_CNTL. |
ERR_DEAD |
The task has exited. |
ERR_BADARG |
The task was never started or has faulted, or h is -1. |