L4Re - L4 Runtime Environment
|
C++ interface of the Task kernel object. More...
Public Member Functions | |
l4_msgtag_t | map (Cap< Task > const &src_task, l4_fpage_t const &snd_fpage, l4_addr_t snd_base, l4_utcb_t *utcb=l4_utcb()) throw () |
Map resources available in the source task to a destination task. More... | |
l4_msgtag_t | unmap (l4_fpage_t const &fpage, l4_umword_t map_mask, l4_utcb_t *utcb=l4_utcb()) throw () |
Revoke rights from the task. More... | |
l4_msgtag_t | unmap_batch (l4_fpage_t const *fpages, unsigned num_fpages, l4_umword_t map_mask, l4_utcb_t *utcb=l4_utcb()) throw () |
Revoke rights from a task. More... | |
l4_msgtag_t | delete_obj (L4::Cap< void > obj, l4_utcb_t *utcb=l4_utcb()) throw () |
Release capability and delete object. More... | |
l4_msgtag_t | release_cap (L4::Cap< void > cap, l4_utcb_t *utcb=l4_utcb()) throw () |
Release capability. More... | |
l4_msgtag_t | cap_valid (Cap< void > const &cap, l4_utcb_t *utcb=l4_utcb()) throw () |
Check whether a capability is present (refers to an object). More... | |
l4_msgtag_t | cap_has_child (Cap< void > const &cap, l4_utcb_t *utcb=l4_utcb()) throw () |
Test whether a capability has child mappings (in another task). More... | |
l4_msgtag_t | cap_equal (Cap< void > const &cap_a, Cap< void > const &cap_b, l4_utcb_t *utcb=l4_utcb()) throw () |
Test whether two capabilities point to the same object with the same rights. More... | |
l4_msgtag_t | add_ku_mem (l4_fpage_t const &fpage, l4_utcb_t *utcb=l4_utcb()) throw () |
Add kernel-user memory. More... | |
![]() | |
l4_msgtag_t | dec_refcnt (l4_mword_t diff, l4_utcb_t *utcb=l4_utcb()) |
Decrement the in kernel reference counter for the object. More... | |
Additional Inherited Members | |
![]() | |
typedef Task | Class |
The target interface type (inheriting from Kobject_t) | |
typedef Typeid::Iface< PROTO, Task > | __Iface |
The interface description for the derived class. | |
typedef Typeid::Merge_list< Typeid::Iface_list< __Iface >, typename Kobject ::__Iface_list > | __Iface_list |
The list of all RPC interfaces provided directly or through inheritance. | |
![]() | |
L4::Cap< Class > | c () const |
Get the capability to ourselves. | |
![]() | |
l4_cap_idx_t | cap () const throw () |
Return capability selector. More... | |
![]() | |
static void | __check_protocols__ () |
Helper to check for protocol conflicts. | |
C++ interface of the Task kernel object.
The L4::Task class 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 associated with an L4::Task.
L4::Task objects are created using the L4::Factory interface.
|
inline |
Add kernel-user memory.
fpage | Flexpage describing the virtual area the memory goes to. |
utcb | UTCP pointer of the calling thread. |
L4_PAGESIZE
). A portable implementation should not depend on allocations greater than 16KiB to succeed.
|
inline |
Test whether two capabilities point to the same object with the same rights.
cap_a | First capability selector to compare. |
cap_b | Second capability selector to compare. |
utcb | Optional: UTCB pointer of the calling thread. |
tag.label() | = 1: cap_a and cap_b point to the same object. |
tag.label() | = 0: The two caps do not point to the same object. |
|
inline |
Test whether a capability has child mappings (in another task).
cap | Capability selector to look up in the destination task. |
utcb | UTCB pointer of the calling thread. |
tag.label() | = 1: The capability has at least on child mapping in another task. |
tag.label() | = 0: No child mappings. |
|
inline |
Check whether a capability is present (refers to an object).
cap | Valid capability to check for presence. |
utcb | UTCB to be used for this operation, usually the UTCB of the calling thread. |
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.
cap
must be a valid capability (i.e. cap.is_valid() == true
). If you are unsure about the validity of your capability use L4::Cap.validate() instead.
|
inline |
Release capability and delete object.
obj | Capability selector of the object to delete. |
utcb | UTCB pointer of the calling thread. |
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.
|
inline |
Map resources available in the source task to a destination task.
src_task | Capability selector of the 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. The lower bits contain additional map control flags. |
utcb | UTCB pointer of the calling thread. |
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. The destination task is the task referenced by the capability invoking map and the receive window is the whole address space of said task.
|
inline |
|
inline |
Revoke rights from the task.
fpage | Flexpage that describes an area in the address space or object space of this task |
map_mask | Unmap mask, see l4_unmap_flags_t |
utcb | UTCB pointer of the calling thread. |
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).
Definition at line 90 of file task.
Referenced by L4Re::Rm::attach().
|
inline |
Revoke rights from a task.
fpages | An array of flexpages. Each item describes an area in the address or object space of this task. |
num_fpages | Number of fpages in the fpages array. |
map_mask | Unmap mask, see l4_unmap_flags_t. |
utcb | UTCB pointer of the calling thread. |
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).
num_fpages
is not bigger than L4_UTCB_GENERIC_DATA_SIZE - 2.