HandleQueryAt
Reads one property of a handle or the object behind it.
| Number |
Selector |
Blocking |
Since |
0x08 SVC_MANAGEHANDLE |
MNGHNDL_QUERY (3) |
no |
2.0 |
SvcResult HandleQueryAt(Handle h, QueryWhat what, size_t index);
Registers: (h, what, index) -> r0 status, r1 value
what |
r1 |
| QUERY_TYPE |
handle type |
| QUERY_PERMS |
the handle's permissions |
| QUERY_MARKER |
the handle's marker |
| QUERY_STATUS |
task exit status, space's last exit status, or ZUZU_OK / ERR_DEAD for a port |
| QUERY_SIZE |
size in bytes of a memory object |
| QUERY_DMA_COUNT |
number of DMA mappings on a device |
| QUERY_DMA_ID |
id of the mapping at index, 0 = newest |
| QUERY_DMA_BUS / _LEN / _DIR |
bus address, length, direction of mapping index (an id) |
Parameters
| Name |
Direction |
Description |
h |
in |
Handle to inspect. |
what |
in |
Property to read. |
index |
in |
QUERY_DMA_ID: position; QUERY_DMA_BUS/_LEN/_DIR: mapping id; otherwise ignored. |
Returns
r0 is the status; r1 the value on success.
Errors
| Error |
Condition |
ERR_BADHANDLE |
h is not a live handle. |
ERR_BADARG |
what is not a known property. |
ERR_BADTYPE |
The property does not apply to this kind of object. |
ERR_NOPERM |
DMA queries need PERM_MAP on the device handle. |
ERR_NOENT |
No DMA mapping at that position or with that id. |