L4Re - L4 Runtime Environment
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
L4::Task Class Reference

An L4 Task. More...

+ Inheritance diagram for L4::Task:
+ Collaboration diagram for L4::Task:

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.
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.
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.
l4_msgtag_t delete_obj (L4::Cap< void > obj, l4_utcb_t *utcb=l4_utcb()) throw ()
 Release capability and delete object.
l4_msgtag_t release_cap (L4::Cap< void > cap, l4_utcb_t *utcb=l4_utcb()) throw ()
 Release capability.
l4_msgtag_t cap_valid (Cap< void > const &cap, l4_utcb_t *utcb=l4_utcb()) throw ()
 Test whether a capability selector points to a valid capability.
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).
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.
l4_msgtag_t add_ku_mem (l4_fpage_t const &fpage, l4_utcb_t *utcb=l4_utcb()) throw ()
 Add kernel-user memory.

Additional Inherited Members

- Protected Member Functions inherited from L4::Kobject
l4_cap_idx_t cap () const throw ()
 Return capability selector.

Detailed Description

An L4 Task.

#include <l4/sys/task>

See Also
Task for an overview description.

Definition at line 41 of file task.

Member Function Documentation

l4_msgtag_t L4::Task::map ( Cap< Task > const &  src_task,
l4_fpage_t const &  snd_fpage,
l4_addr_t  snd_base,
l4_utcb_t utcb = l4_utcb() 
) throw ()
inline

Map resources available in the source task to a destination task.

Parameters
dst_taskCapability selector of destination task
src_taskCapability selector of source task
snd_fpageSend flexpage that describes an area in the address space or object space of the source task
snd_baseSend 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.

Note
dst_task is the implicit this pointer.

Definition at line 50 of file task.

References L4::Cap_base::cap(), and L4::Kobject::cap().

+ Here is the call graph for this function:

l4_msgtag_t L4::Task::unmap ( l4_fpage_t const &  fpage,
l4_umword_t  map_mask,
l4_utcb_t utcb = l4_utcb() 
) throw ()
inline

Revoke rights from the task.

Parameters
taskCapability selector of destination task
fpageFlexpage that describes an area in the address space or object space of the destination task
map_maskUnmap 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).

Note
Calling this function on the object space can cause a root capability of an object to be destructed, which destroys the object itself.

Note
task is the implicit this pointer.

Definition at line 59 of file task.

References L4::Kobject::cap().

+ Here is the call graph for this function:

l4_msgtag_t L4::Task::unmap_batch ( l4_fpage_t const *  fpages,
unsigned  num_fpages,
l4_umword_t  map_mask,
l4_utcb_t utcb = l4_utcb() 
) throw ()
inline

Revoke rights from a task.

Parameters
taskCapability selector of destination task
fpagesAn array of flexpages that describes an area in the address space or object space of the destination task each
num_fpagesThe size of the fpages array in elements (number of fpages sent).
map_maskUnmap 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.

Note
task is the implicit this pointer.

Definition at line 68 of file task.

References L4::Kobject::cap().

+ Here is the call graph for this function:

l4_msgtag_t L4::Task::delete_obj ( L4::Cap< void >  obj,
l4_utcb_t utcb = l4_utcb() 
) throw ()
inline

Release capability and delete object.

Parameters
taskCapability selector of destination task
objCapability 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 is operating calls l4_task_unmap() with L4_FP_DELETE_OBJ.

Note
task is the implicit this pointer.

Definition at line 78 of file task.

References L4::Cap_base::cap(), and L4::Kobject::cap().

+ Here is the call graph for this function:

l4_msgtag_t L4::Task::release_cap ( L4::Cap< void >  cap,
l4_utcb_t utcb = l4_utcb() 
) throw ()
inline

Release capability.

Parameters
taskCapability selector of destination task
capCapability selector to release
Returns
Syscall return tag

This operation unmaps the capability from the specified task.

Note
task is the implicit this pointer.

Definition at line 86 of file task.

References L4::Cap_base::cap(), and L4::Kobject::cap().

+ Here is the call graph for this function:

l4_msgtag_t L4::Task::cap_valid ( Cap< void > const &  cap,
l4_utcb_t utcb = l4_utcb() 
) throw ()
inline

Test whether a capability selector points to a valid capability.

Parameters
taskCapability selector of the destination task to do the lookup in
capCapability selector to look up in the destination task
Returns
label contains 1 if valid, 0 if invalid

Note
task is the implicit this pointer.

Definition at line 94 of file task.

References L4::Cap_base::cap(), and L4::Kobject::cap().

+ Here is the call graph for this function:

l4_msgtag_t L4::Task::cap_has_child ( Cap< void > const &  cap,
l4_utcb_t utcb = l4_utcb() 
) throw ()
inline

Test whether a capability has child mappings (in another task).

Parameters
taskCapability selector of the destination task to do the lookup in
capCapability selector to look up in the destination task
Returns
label contains 1 if it has at least one child, 0 if not or invalid

Note
task is the implicit this pointer.

Definition at line 102 of file task.

References L4::Cap_base::cap(), and L4::Kobject::cap().

+ Here is the call graph for this function:

l4_msgtag_t L4::Task::cap_equal ( Cap< void > const &  cap_a,
Cap< void > const &  cap_b,
l4_utcb_t utcb = l4_utcb() 
) throw ()
inline

Test whether two capabilities point to the same object with the same rights.

Parameters
taskCapability selector of the destination task to do the lookup in
cap_aCapability selector to compare
cap_bCapability selector to compare
Returns
label contains 1 if equal, 0 if not equal

Note
task is the implicit this pointer.

Definition at line 110 of file task.

References L4::Cap_base::cap(), and L4::Kobject::cap().

+ Here is the call graph for this function:

l4_msgtag_t L4::Task::add_ku_mem ( l4_fpage_t const &  fpage,
l4_utcb_t utcb = l4_utcb() 
) throw ()
inline

Add kernel-user memory.

Parameters
taskCapability selector of the task to add the memory to
ku_memFlexpage describing the virtual area the memory goes to.
Returns
Syscall return tag

Note
task is the implicit this pointer.

Definition at line 119 of file task.

References L4::Kobject::cap().

+ Here is the call graph for this function:


The documentation for this class was generated from the following file:
L4Re - L4 Runtime Environment