L4Re Operating System Framework
Interface and Usage Documentation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
task
Go to the documentation of this file.
1// vi:set ft=cpp: -*- Mode: C++ -*-
6/*
7 * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
8 * Alexander Warg <warg@os.inf.tu-dresden.de>
9 * economic rights: Technische Universität Dresden (Germany)
10 *
11 * License: see LICENSE.spdx (in this directory or the directories above)
12 */
13
14#pragma once
15
16#include <l4/sys/task.h>
17#include <l4/sys/capability>
18
19namespace L4 {
20
33class Task :
34 public Kobject_t<Task, Kobject, L4_PROTO_TASK,
35 Type_info::Demand_t<2> >
36{
37public:
84 l4_msgtag_t map(Cap<Task> const &src_task,
85 l4_fpage_t const &snd_fpage, l4_umword_t snd_base,
86 l4_utcb_t *utcb = l4_utcb()) noexcept
87 { return l4_task_map_u(cap(), src_task.cap(), snd_fpage, snd_base, utcb); }
88
135 l4_umword_t map_mask,
136 l4_utcb_t *utcb = l4_utcb()) noexcept
137 { return l4_task_unmap_u(cap(), fpage, map_mask, utcb); }
138
154 unsigned num_fpages,
155 l4_umword_t map_mask,
156 l4_utcb_t *utcb = l4_utcb()) noexcept
157 { return l4_task_unmap_batch_u(cap(), fpages, num_fpages, map_mask, utcb); }
158
180 l4_utcb_t *utcb = l4_utcb()) noexcept
181 { return l4_task_delete_obj_u(cap(), obj.cap(), utcb); }
182
201 l4_utcb_t *utcb = l4_utcb()) noexcept
202 { return l4_task_release_cap_u(this->cap(), cap.cap(), utcb); }
203
222 l4_utcb_t *utcb = l4_utcb()) noexcept
223 { return l4_task_cap_valid_u(this->cap(), cap.cap(), utcb); }
224
239 Cap<void> const &cap_b,
240 l4_utcb_t *utcb = l4_utcb()) noexcept
241 { return l4_task_cap_equal_u(cap(), cap_a.cap(), cap_b.cap(), utcb); }
242
269 l4_utcb_t *utcb = l4_utcb()) noexcept
270 { return l4_task_add_ku_mem_u(cap(), fpage, utcb); }
271
272};
273}
274
275
L4::Cap related definitions.
l4_cap_idx_t cap() const noexcept
Return capability selector.
Definition capability.h:49
C++ interface for capabilities.
Definition capability.h:219
Helper class to create an L4Re interface class that is derived from a single base class.
Definition __typeinfo.h:750
l4_cap_idx_t cap() const noexcept
Return capability selector.
Definition kobject:69
C++ interface of the Task kernel object, see Task for the C interface.
Definition task:36
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:84
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:134
l4_msgtag_t delete_obj(L4::Cap< void > obj, l4_utcb_t *utcb=l4_utcb()) noexcept
Release capability and delete object.
Definition task:179
l4_msgtag_t release_cap(L4::Cap< void > cap, l4_utcb_t *utcb=l4_utcb()) noexcept
Release object capability.
Definition task:200
l4_msgtag_t add_ku_mem(l4_fpage_t *fpage, l4_utcb_t *utcb=l4_utcb()) noexcept
Add kernel-user memory.
Definition task:268
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:153
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:221
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 rights.
Definition task:238
unsigned long l4_umword_t
Unsigned machine word.
Definition l4int.h:40
struct l4_utcb_t l4_utcb_t
Opaque type for the UTCB.
Definition utcb.h:56
l4_utcb_t * l4_utcb(void) L4_NOTHROW L4_PURE
Get the UTCB address.
Definition utcb.h:346
L4 low-level kernel interface.
Message tag data structure.
Definition types.h:153
L4 flexpage type.
Definition __l4_fpage.h:76