C interface of the Task kernel object.
More...
|
l4_msgtag_t | l4_task_vgicc_map (l4_cap_idx_t task, l4_fpage_t vgicc_fpage) L4_NOTHROW |
| Map the GIC's virtual GICC page to the task. More...
|
|
l4_msgtag_t | l4_task_map (l4_cap_idx_t dst_task, l4_cap_idx_t src_task, l4_fpage_t snd_fpage, l4_umword_t snd_base) L4_NOTHROW |
| Map resources available in the source task to a destination task. More...
|
|
l4_msgtag_t | l4_task_unmap (l4_cap_idx_t task, l4_fpage_t fpage, l4_umword_t map_mask) L4_NOTHROW |
| Revoke rights from the task. More...
|
|
l4_msgtag_t | l4_task_unmap_batch (l4_cap_idx_t task, l4_fpage_t const *fpages, unsigned num_fpages, l4_umword_t map_mask) L4_NOTHROW |
| Revoke rights from a task. More...
|
|
l4_msgtag_t | l4_task_delete_obj (l4_cap_idx_t task, l4_cap_idx_t obj) L4_NOTHROW |
| Release capability and delete object. More...
|
|
l4_msgtag_t | l4_task_release_cap (l4_cap_idx_t task, l4_cap_idx_t cap) L4_NOTHROW |
| Release capability. More...
|
|
l4_msgtag_t | l4_task_cap_valid (l4_cap_idx_t task, l4_cap_idx_t cap) L4_NOTHROW |
| Check whether a capability is present (refers to an object). More...
|
|
l4_msgtag_t | l4_task_cap_equal (l4_cap_idx_t task, l4_cap_idx_t cap_a, l4_cap_idx_t cap_b) L4_NOTHROW |
| Test whether two capabilities point to the same object with the same rights. More...
|
|
l4_msgtag_t | l4_task_add_ku_mem (l4_cap_idx_t task, l4_fpage_t ku_mem) L4_NOTHROW |
| Add kernel-user memory. More...
|
|
C interface of the Task kernel object.
A task represents a combination of the address spaces provided by the L4Re micro kernel. A task consists of at least a memory address space and an object address space. On IA32 there is also an IO-port address space.
Task objects are created using the Factory interface.
- Include File
-
◆ l4_unmap_flags_t
◆ l4_task_add_ku_mem()
Add kernel-user memory.
- Parameters
-
task | Capability selector of the task to add the memory to |
ku_mem | Flexpage describing the virtual area the memory goes to. |
- Returns
- Syscall return tag
Definition at line 403 of file task.h.
◆ l4_task_cap_equal()
Test whether two capabilities point to the same object with the same rights.
- Parameters
-
task | Capability selector of the destination task to do the lookup in |
cap_a | Capability selector to compare |
cap_b | Capability selector to compare |
- Returns
- label contains 1 if equal, 0 if not equal
Definition at line 396 of file task.h.
◆ l4_task_cap_valid()
Check whether a capability is present (refers to an object).
- Parameters
-
task | Task to check the capability in. |
cap | Valid capability to check for presence. |
- Return values
-
tag.label() | > 0 Capability is present (refers to an object). |
tag.label() | == 0 No capability present (void object). |
A capability is considered present when it refers to an existing kernel object.
- Precondition
cap
must be a valid capability index (i.e. not L4_INVALID_CAP or the like).
Definition at line 390 of file task.h.
◆ l4_task_delete_obj()
Release capability and delete object.
- Parameters
-
task | Capability selector of destination task |
obj | Capability selector of object to delete |
- Returns
- Syscall return tag
The object will be deleted if the obj has sufficient rights. No error will be reported if the rights are insufficient, however, the capability is removed in all cases.
This operation calls l4_task_unmap() with L4_FP_DELETE_OBJ.
Definition at line 369 of file task.h.
◆ l4_task_map()
Map resources available in the source task to a destination task.
- Parameters
-
dst_task | Capability selector of destination task |
src_task | Capability selector of source task |
snd_fpage | Send flexpage that describes an area in the address space or object space of the source task. |
snd_base | Send base that describes an offset in the receive window of the destination task. |
- Returns
- Syscall return tag
This method allows for asynchronous rights delegation from one task to another. It can be used to share memory as well as to delegate access to objects.
Definition at line 339 of file task.h.
Referenced by L4::Cap_base::copy(), and L4::Cap_base::move().
◆ l4_task_release_cap()
Release capability.
- Parameters
-
task | Capability selector of destination task |
cap | Capability selector to release |
- Returns
- Syscall return tag
This operation unmaps the capability from the specified task.
Definition at line 384 of file task.h.
◆ l4_task_unmap()
◆ l4_task_unmap_batch()
Revoke rights from a task.
- Parameters
-
task | Capability selector of destination task |
fpages | An array of flexpages that describes an area in the address space or object space of the destination task each |
num_fpages | The size of the fpages array in elements (number of fpages sent). |
map_mask | Unmap mask, see l4_unmap_flags_t |
- Returns
- Syscall return tag
This method allows to revoke rights from the destination task and from all the tasks that got the rights delegated from that task (i.e., this operation does a recursive rights revocation).
- Precondition
- The caller needs to take care that num_fpages is not bigger than L4_UTCB_GENERIC_DATA_SIZE - 2.
- Note
- Calling this function on the object space can cause a root capability of an object to be destructed, which destroys the object itself.
Definition at line 353 of file task.h.
◆ l4_task_vgicc_map()
Map the GIC's virtual GICC page to the task.
- Parameters
-
task | Capability selector of destination task |
vgicc_fpage | Flexpage that describes an area in the address space of the destination task to map the vGICC page to |
- Returns
- Syscall return tag
Definition at line 56 of file __task-arm.h.
References l4_utcb().