L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
cap
Go to the documentation of this file.
1// -*- Mode: C++ -*-
2// vim:ft=cpp
7/*
8 * (c) 2009 Adam Lackorzynski <adam@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>
28
29namespace L4Re { namespace Util {
30
38L4_CV static inline l4_msgtag_t cap_release(L4::Cap<void> cap)
39{
41 l4_obj_fpage(cap.cap(), 0, L4_FPAGE_RWX),
43}
44
45}}
l4_cap_idx_t cap() const noexcept
Return capability selector.
Definition capability.h:49
C++ interface for capabilities.
Definition capability.h:219
@ L4_BASE_TASK_CAP
Capability selector for the current task.
Definition consts.h:316
l4_fpage_t l4_obj_fpage(l4_cap_idx_t obj, unsigned int order, unsigned char rights) L4_NOTHROW
Create a kernel-object flex page.
Definition __l4_fpage.h:680
@ L4_FPAGE_RWX
Read-write-execute flex page.
Definition __l4_fpage.h:131
l4_msgtag_t l4_task_unmap(l4_cap_idx_t task, l4_fpage_t fpage, l4_umword_t map_mask) L4_NOTHROW
Revoke rights from the task.
Definition task.h:411
@ L4_FP_ALL_SPACES
Flag to tell the unmap operation to revoke permissions from all child mappings including the mapping ...
Definition consts.h:198
#define L4_CV
Define calling convention.
Definition linkage.h:44
L4Re C++ Interfaces.
Definition l4re.dox:17
Message tag data structure.
Definition types.h:164
Common task related definitions.