Loading...
Searching...
No Matches
task
Go to the documentation of this file.
// vi:set ft=cpp: -*- Mode: C++ -*-
/*
* (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
* Alexander Warg <warg@os.inf.tu-dresden.de>
* economic rights: Technische Universität Dresden (Germany)
*
* License: see LICENSE.spdx (in this directory or the directories above)
*/
#pragma once
#include <l4/sys/task.h>
#include <l4/sys/capability>
namespace L4 {
class Task :
public Kobject_t<Task, Kobject, L4_PROTO_TASK,
Type_info::Demand_t<2> >
{
public:
l4_msgtag_t map(Cap<Task> const &src_task,
l4_fpage_t const &snd_fpage, l4_umword_t snd_base,
l4_utcb_t *utcb = l4_utcb()) noexcept
{ return l4_task_map_u(cap(), src_task.cap(), snd_fpage, snd_base, utcb); }
l4_msgtag_t unmap(l4_fpage_t const &fpage,
l4_umword_t map_mask,
l4_utcb_t *utcb = l4_utcb()) noexcept
{ return l4_task_unmap_u(cap(), fpage, map_mask, utcb); }
l4_msgtag_t unmap_batch(l4_fpage_t const *fpages,
unsigned num_fpages,
l4_umword_t map_mask,
l4_utcb_t *utcb = l4_utcb()) noexcept
{ return l4_task_unmap_batch_u(cap(), fpages, num_fpages, map_mask, utcb); }
l4_msgtag_t delete_obj(L4::Cap<void> obj,
l4_utcb_t *utcb = l4_utcb()) noexcept
{ return l4_task_delete_obj_u(cap(), obj.cap(), utcb); }
l4_msgtag_t release_cap(L4::Cap<void> cap,
l4_utcb_t *utcb = l4_utcb()) noexcept
{ return l4_task_release_cap_u(this->cap(), cap.cap(), utcb); }
l4_msgtag_t cap_valid(Cap<void> const &cap,
l4_utcb_t *utcb = l4_utcb()) noexcept
{ return l4_task_cap_valid_u(this->cap(), cap.cap(), utcb); }
l4_msgtag_t cap_equal(Cap<void> const &cap_a,
Cap<void> const &cap_b,
l4_utcb_t *utcb = l4_utcb()) noexcept
{ return l4_task_cap_equal_u(cap(), cap_a.cap(), cap_b.cap(), utcb); }
l4_msgtag_t add_ku_mem(l4_fpage_t *fpage,
l4_utcb_t *utcb = l4_utcb()) noexcept
{ return l4_task_add_ku_mem_u(cap(), fpage, utcb); }
};
}
capability
L4::Cap related definitions.
L4::Cap_base::cap
l4_cap_idx_t cap() const noexcept
Return capability selector.
Definition capability.h:49
L4::Cap
C++ interface for capabilities.
Definition capability.h:224
L4::Kobject_t
Helper class to create an L4Re interface class that is derived from a single base class.
Definition __typeinfo.h:750
L4::Kobject::cap
l4_cap_idx_t cap() const noexcept
Return capability selector.
Definition kobject:69
L4::Task
C++ interface of the Task kernel object, see Task for the C interface.
Definition task:36
L4::Task::map
l4_msgtag_t map(Cap< Task > const &src_task, l4_fpage_t const &snd_fpage, l4_umword_t snd_base, l4_utcb_t *utcb=l4_utcb()) noexcept
Map resources available in the source task to a destination task.
Definition task:85
L4::Task::unmap
l4_msgtag_t unmap(l4_fpage_t const &fpage, l4_umword_t map_mask, l4_utcb_t *utcb=l4_utcb()) noexcept
Revoke rights from the task.
Definition task:135
L4::Task::delete_obj
l4_msgtag_t delete_obj(L4::Cap< void > obj, l4_utcb_t *utcb=l4_utcb()) noexcept
Release capability and delete object.
Definition task:180
L4::Task::release_cap
l4_msgtag_t release_cap(L4::Cap< void > cap, l4_utcb_t *utcb=l4_utcb()) noexcept
Release object capability.
Definition task:201
L4::Task::add_ku_mem
l4_msgtag_t add_ku_mem(l4_fpage_t *fpage, l4_utcb_t *utcb=l4_utcb()) noexcept
Add kernel-user memory.
Definition task:281
L4::Task::unmap_batch
l4_msgtag_t unmap_batch(l4_fpage_t const *fpages, unsigned num_fpages, l4_umword_t map_mask, l4_utcb_t *utcb=l4_utcb()) noexcept
Revoke rights from a task.
Definition task:154
L4::Task::cap_valid
l4_msgtag_t cap_valid(Cap< void > const &cap, l4_utcb_t *utcb=l4_utcb()) noexcept
Check whether a capability is present (refers to an object).
Definition task:222
L4::Task::cap_equal
l4_msgtag_t cap_equal(Cap< void > const &cap_a, Cap< void > const &cap_b, l4_utcb_t *utcb=l4_utcb()) noexcept
Test whether two capabilities point to the same object with the same permissions (only considering se...
Definition task:251
l4_umword_t
unsigned long l4_umword_t
Unsigned machine word.
Definition l4int.h:40
l4_utcb_t
struct l4_utcb_t l4_utcb_t
Opaque type for the UTCB.
Definition utcb.h:56
l4_utcb
l4_utcb_t * l4_utcb(void) L4_NOTHROW L4_PURE
Get the UTCB address.
Definition utcb.h:346
task.h
Common task related definitions.
L4
L4 low-level kernel interface.
Definition l4sys-l4f-groups.dox:50
l4_msgtag_t
Message tag data structure.
Definition types.h:154
l4_fpage_t
L4 flexpage type.
Definition __l4_fpage.h:76