SetLabel
| Number | 0x28 |
|---|---|
| Signature | (handle, marker) -> stamped_handle or -err |
| Group | handles |
| Since | 1.1.1 |
Add a 32-bit label value to a process. Used for distinguishing at name server level.
Pitfalls
Only the init process may call this. Only an unlabeled process can get labelled.
Arguments
| Register | Name | Description |
|---|---|---|
r0 | handle | Process to label |
r1 | label | The value to label the process with. Must be nonzero; 0 (`LABEL_NONE`) is the reserved sentinel |
Returns
ZUZU_OK on success
Errors
| Code | Condition |
|---|---|
ERR_BADARG | label is `LABEL_NONE` (0) |
ERR_BADHANDLE | handle names no live entry |
ERR_BADTYPE | handle is not a port |
ERR_BUSY | Process is not FROZEN |
ERR_DUPLICATE | process already has label |
ERR_NOMEM | Caller's handle table is full |