L4Re Operating System Framework – Interface and Usage Documentation
Loading...
Searching...
No Matches
namespace
Go to the documentation of this file.
1// -*- Mode: C++ -*-
2// vim:ft=cpp
7/*
8 * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
9 * Alexander Warg <warg@os.inf.tu-dresden.de>,
10 * Björn Döbel <doebel@os.inf.tu-dresden.de>
11 * economic rights: Technische Universität Dresden (Germany)
12 *
13 * This file is part of TUD:OS and distributed under the terms of the
14 * GNU General Public License 2.
15 * Please see the COPYING-GPL-2 file for details.
16 *
17 * As a special exception, you may use this file as part of a free software
18 * library without restriction. Specifically, if other files instantiate
19 * templates or use macros or inline functions from this file, or you compile
20 * this file and link it with other files to produce an executable, this
21 * file does not by itself cause the resulting executable to be covered by
22 * the GNU General Public License. This exception does not however
23 * invalidate any other reasons why the executable file might be covered by
24 * the GNU General Public License.
25 */
26#pragma once
27
28#include <l4/sys/capability>
29#include <l4/re/protocols.h>
30#include <l4/sys/cxx/ipc_iface>
31#include <l4/sys/cxx/ipc_array>
32#include <l4/sys/cxx/ipc_string>
33
34namespace L4Re {
35
61 public L4::Kobject_t<Namespace, L4::Kobject, L4RE_PROTO_NAMESPACE,
62 L4::Type_info::Demand_t<1> >
63{
64public:
69 {
74 Strong = L4_CAP_FPAGE_S,
75 Trusted = 0x008,
76
77 Cap_flags = Ro | Rw | Strong | Trusted,
78
79 Link = 0x100,
80 Overwrite = 0x200,
81 };
82
89 {
90 Partly_resolved = 0x020,
91 };
92
95 {
96 To_default = 3600000,
97 To_non_blocking = 0,
98 };
99
100 L4_RPC_NF(
105
131 long query(char const *name, L4::Cap<void> const &cap,
132 int timeout = To_default,
133 l4_umword_t *local_id = 0, bool iterate = true) const noexcept;
134
144 long query(char const *name, unsigned len, L4::Cap<void> const &cap,
145 int timeout = To_default,
146 l4_umword_t *local_id = 0, bool iterate = true) const noexcept;
147
148 L4_RPC_NF(long, register_obj, (unsigned flags,
149 L4::Ipc::Array<char const, unsigned long> name,
150 L4::Ipc::Opt< L4::Ipc::Cap<void> > obj),
151 L4::Ipc::Call_t<L4_CAP_FPAGE_W>);
152
176 long register_obj(char const *name, L4::Ipc::Cap<void> obj,
177 unsigned flags = Rw) const noexcept
178 {
179 return register_obj_t::call(c(), flags,
181 __builtin_strlen(name), name),
182 obj);
183 }
184
185 L4_RPC_NF_OP(3, // backward compatibility opcode
188
203 long unlink(char const* name)
204 {
205 return unlink_t::call(c(), L4::Ipc::Array<char const, unsigned long>(
206 __builtin_strlen(name), name));
207 }
208
210
211private:
212 long _query(char const *name, unsigned len,
213 L4::Cap<void> const &target, l4_umword_t *local_id,
214 bool iterate) const noexcept;
215
216};
217
218};
L4::Cap related definitions.
Name-space interface.
Definition namespace:63
Query_result_flags
Flags returned by query IPC, only used internally.
Definition namespace:89
long unlink(char const *name)
Remove an entry from the name space.
Definition namespace:203
Register_flags
Flags for registering name spaces.
Definition namespace:69
Query_timeout
Timeout values for query operation.
Definition namespace:95
C++ interface for capabilities.
Definition capability.h:222
Generic RPC wrapper for L4 flex-pages.
Definition ipc_types:322
A receive item for receiving a single object capability.
Definition ipc_types:269
Helper class to create an L4Re interface class that is derived from a single base class.
Definition __typeinfo.h:760
unsigned long l4_umword_t
Unsigned machine word.
Definition l4int.h:51
@ L4_CAP_FPAGE_RO
Read right for capability flex-pages.
Definition __l4_fpage.h:179
@ L4_CAP_FPAGE_RW
Read and interface specific 'W' right for capability flex-pages.
Definition __l4_fpage.h:195
@ L4_CAP_FPAGE_W
Interface specific 'W' right for capability flex-pages.
Definition __l4_fpage.h:160
@ L4_CAP_FPAGE_RS
Read and interface specific 'S' right for capability flex-pages.
Definition __l4_fpage.h:202
@ L4_CAP_FPAGE_RWS
Read, interface specific 'W', and 'S' rights for capability flex-pages.
Definition __l4_fpage.h:209
@ L4_CAP_FPAGE_S
Interface specific 'S' right for capability flex-pages.
Definition __l4_fpage.h:172
#define L4_EXPORT
Attribute to mark functions, variables, and data types as being exported from a library.
Definition compiler.h:221
Interface Definition Language.
#define L4_RPC_NF_OP(op, res, name, args...)
Define an RPC call type with specific opcode (the type only, no callable).
Definition ipc_iface:512
#define L4_RPC_NF(res, name, args...)
Define an RPC call type (the type only, no callable).
Definition ipc_iface:497
L4Re C++ Interfaces.
Definition cmd_control:15
L4 low-level kernel interface.
L4Re Protocol Constants (C version)
Array reference data type for arrays located in the message.
Definition ipc_array:40
Array data type for dynamically sized arrays in RPCs.
Definition ipc_array:93
RPC attribute for an RPC call with required rights.
Definition ipc_iface:258
Attribute for defining an optional RPC argument.
Definition ipc_types:148
Standard list of RPCs of an interface.
Definition __typeinfo.h:438