HandleGrant¶
Copies a handle into another space's handle table.
| Number | Selector | Blocking | Since |
|---|---|---|---|
0x08 SVC_MANAGEHANDLE |
MNGHNDL_GRANT (5) |
no | 2.0 |
SvcResult HandleGrant(Handle h, Handle target_space_handle, HandlePerms perms);
Registers: (h, target_space, perms) -> r0 status, r1 handle in the target
The copy keeps the marker of h. The receiving space has to learn the new handle's value some other way (by convention, or a message). HandleGrantTo() is the easier form.
Parameters¶
| Name | Direction | Description |
|---|---|---|
h |
in | Handle to grant, with PERM_TXFR. |
target_space_handle |
in | Space to receive it, with PERM_CNTL. |
perms |
in | Permissions for the copy; intersected with those of h. |
Returns¶
r0 is the status; r1 the handle's value in the target's table.
Errors¶
| Error | Condition |
|---|---|
ERR_BADHANDLE |
h or target_space_handle is not a live handle. |
ERR_BADTYPE |
target_space_handle is not a space. |
ERR_NOPERM |
target_space_handle lacks PERM_CNTL, or h lacks PERM_TXFR. |
ERR_DEAD |
The target space has been torn down. |
ERR_NOMEM |
The target's handle table is full. |