TaskSetRegs¶
Writes the user registers of a faulted or suspended task.
| Number | Selector | Blocking | Since |
|---|---|---|---|
0x0C SVC_MANAGETASK |
MNGTASK_SET_REGS (8) |
no | 2.0 |
Err TaskSetRegs(Handle h, const TaskRegs *in);
Registers: (task, in) -> r0 status
Privileged bits in in->flags are ignored, the task always resumes in user mode with interrupts enabled.
Parameters¶
| Name | Direction | Description |
|---|---|---|
h |
in | Task handle with PERM_CNTL. |
in |
in | New register values. |
Returns¶
ZUZU_OK, or an error code.
Errors¶
| Error | Condition |
|---|---|
ERR_BUSY |
The task is running, or suspended inside a blocking call. |
ERR_BADARG |
in->pc is misaligned for the instruction set in in->flags. |
ERR_DEAD |
The task has exited. |
ERR_BADPTR |
in is not readable memory. |
ERR_BADHANDLE |
h is not a live handle. |
ERR_BADTYPE |
h is not a task. |
ERR_NOPERM |
h lacks PERM_CNTL. |