L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
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 * This file is part of TUD:OS and distributed under the terms of the
12 * GNU General Public License 2.
13 * Please see the COPYING-GPL-2 file for details.
14 *
15 * As a special exception, you may use this file as part of a free software
16 * library without restriction. Specifically, if other files instantiate
17 * templates or use macros or inline functions from this file, or you compile
18 * this file and link it with other files to produce an executable, this
19 * file does not by itself cause the resulting executable to be covered by
20 * the GNU General Public License. This exception does not however
21 * invalidate any other reasons why the executable file might be covered by
22 * the GNU General Public License.
23 */
24
25#pragma once
26
27#include <l4/sys/task.h>
28#include <l4/sys/capability>
29
30namespace L4 {
31
44class Task :
45 public Kobject_t<Task, Kobject, L4_PROTO_TASK,
46 Type_info::Demand_t<2> >
47{
48public:
95 l4_msgtag_t map(Cap<Task> const &src_task,
96 l4_fpage_t const &snd_fpage, l4_umword_t snd_base,
97 l4_utcb_t *utcb = l4_utcb()) noexcept
98 { return l4_task_map_u(cap(), src_task.cap(), snd_fpage, snd_base, utcb); }
99
124 l4_umword_t map_mask,
125 l4_utcb_t *utcb = l4_utcb()) noexcept
126 { return l4_task_unmap_u(cap(), fpage, map_mask, utcb); }
127
143 unsigned num_fpages,
144 l4_umword_t map_mask,
145 l4_utcb_t *utcb = l4_utcb()) noexcept
146 { return l4_task_unmap_batch_u(cap(), fpages, num_fpages, map_mask, utcb); }
147
169 l4_utcb_t *utcb = l4_utcb()) noexcept
170 { return l4_task_delete_obj_u(cap(), obj.cap(), utcb); }
171
188 l4_utcb_t *utcb = l4_utcb()) noexcept
189 { return l4_task_release_cap_u(this->cap(), cap.cap(), utcb); }
190
209 l4_utcb_t *utcb = l4_utcb()) noexcept
210 { return l4_task_cap_valid_u(this->cap(), cap.cap(), utcb); }
211
226 Cap<void> const &cap_b,
227 l4_utcb_t *utcb = l4_utcb()) noexcept
228 { return l4_task_cap_equal_u(cap(), cap_a.cap(), cap_b.cap(), utcb); }
229
256 l4_utcb_t *utcb = l4_utcb()) noexcept
257 { return l4_task_add_ku_mem_u(cap(), fpage, utcb); }
258
259};
260}
261
262
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:761
l4_cap_idx_t cap() const noexcept
Return capability selector.
Definition kobject:79
C++ interface of the Task kernel object, see Task for the C interface.
Definition task:47
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:95
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:123
l4_msgtag_t delete_obj(L4::Cap< void > obj, l4_utcb_t *utcb=l4_utcb()) noexcept
Release capability and delete object.
Definition task:168
l4_msgtag_t release_cap(L4::Cap< void > cap, l4_utcb_t *utcb=l4_utcb()) noexcept
Release object capability.
Definition task:187
l4_msgtag_t add_ku_mem(l4_fpage_t *fpage, l4_utcb_t *utcb=l4_utcb()) noexcept
Add kernel-user memory.
Definition task:255
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:142
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:208
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:225
unsigned long l4_umword_t
Unsigned machine word.
Definition l4int.h:51
struct l4_utcb_t l4_utcb_t
Opaque type for the UTCB.
Definition utcb.h:67
l4_utcb_t * l4_utcb(void) L4_NOTHROW L4_PURE
Get the UTCB address.
Definition utcb.h:340
L4 low-level kernel interface.
Definition io_regblock.h:19
Message tag data structure.
Definition types.h:164
L4 flexpage type.
Definition __l4_fpage.h:85