L4Re Operating System Framework
Interface and Usage Documentation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 * License: see LICENSE.spdx (in this directory or the directories above)
14 */
15#pragma once
16
17#include <l4/sys/capability>
18#include <l4/re/protocols.h>
19#include <l4/sys/cxx/ipc_iface>
20#include <l4/sys/cxx/ipc_array>
21#include <l4/sys/cxx/ipc_string>
22
23namespace L4Re {
24
50 public L4::Kobject_t<Namespace, L4::Kobject, L4RE_PROTO_NAMESPACE,
51 L4::Type_info::Demand_t<1> >
52{
53public:
58 {
63 Strong = L4_CAP_FPAGE_S,
64 Trusted = 0x008,
65
66 Cap_flags = Ro | Rw | Strong | Trusted,
67
68 Link = 0x100,
69 Overwrite = 0x200,
70 };
71
78 {
79 Partly_resolved = 0x020,
80 };
81
84 {
85 To_default = 3600000,
86 To_non_blocking = 0,
87 };
88
94
120 long query(char const *name, L4::Cap<void> const &cap,
121 int timeout = To_default,
122 l4_umword_t *local_id = 0, bool iterate = true) const noexcept;
123
133 long query(char const *name, unsigned len, L4::Cap<void> const &cap,
134 int timeout = To_default,
135 l4_umword_t *local_id = 0, bool iterate = true) const noexcept;
136
137 L4_RPC_NF(long, register_obj, (unsigned flags,
138 L4::Ipc::Array<char const, unsigned long> name,
139 L4::Ipc::Opt< L4::Ipc::Cap<void> > obj),
140 L4::Ipc::Call_t<L4_CAP_FPAGE_W>);
141
165 long register_obj(char const *name, L4::Ipc::Cap<void> obj,
166 unsigned flags = Rw) const noexcept
167 {
168 return register_obj_t::call(c(), flags,
170 __builtin_strlen(name), name),
171 obj);
172 }
173
174 L4_RPC_NF_OP(3, // backward compatibility opcode
177
192 long unlink(char const* name)
193 {
194 return unlink_t::call(c(), L4::Ipc::Array<char const, unsigned long>(
195 __builtin_strlen(name), name));
196 }
197
199
200private:
201 long _query(char const *name, unsigned len,
202 L4::Cap<void> const &target, l4_umword_t *local_id,
203 bool iterate) const noexcept;
204
205};
206
207};
L4::Cap related definitions.
Name-space interface.
Definition namespace:52
Query_result_flags
Flags returned by query IPC, only used internally.
Definition namespace:78
long unlink(char const *name)
Remove an entry from the name space.
Definition namespace:192
Register_flags
Flags for registering name spaces.
Definition namespace:58
Query_timeout
Timeout values for query operation.
Definition namespace:84
C++ interface for capabilities.
Definition capability.h:219
A receive item for receiving a single object capability.
Definition ipc_types:258
Send item or return item.
Definition ipc_types:324
Helper class to create an L4Re interface class that is derived from a single base class.
Definition __typeinfo.h:750
unsigned long l4_umword_t
Unsigned machine word.
Definition l4int.h:40
@ L4_CAP_FPAGE_RO
Read right for capability flexpages.
Definition __l4_fpage.h:176
@ L4_CAP_FPAGE_RW
Read and interface specific 'W' right for capability flexpages.
Definition __l4_fpage.h:192
@ L4_CAP_FPAGE_W
Interface specific 'W' right for capability flexpages.
Definition __l4_fpage.h:157
@ L4_CAP_FPAGE_RS
Read and interface specific 'S' right for capability flexpages.
Definition __l4_fpage.h:199
@ L4_CAP_FPAGE_RWS
Read, interface specific 'W', and 'S' rights for capability flexpages.
Definition __l4_fpage.h:206
@ L4_CAP_FPAGE_S
Interface specific 'S' right for capability flexpages.
Definition __l4_fpage.h:169
#define L4_EXPORT
Attribute to mark functions, variables, and data types as being exported from a library.
Definition compiler.h:210
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:519
#define L4_RPC_NF(res, name, args...)
Define an RPC call type (the type only, no callable).
Definition ipc_iface:504
L4Re C++ Interfaces.
Definition cmd_control:14
L4 low-level kernel interface.
L4Re Protocol Constants (C version)
Array reference data type for arrays located in the message.
Definition ipc_array:29
Array data type for dynamically sized arrays in RPCs.
Definition ipc_array:82
RPC attribute for an RPC call with required rights.
Definition ipc_iface:265
Attribute for defining an optional RPC argument.
Definition ipc_types:137
Standard list of RPCs of an interface.
Definition __typeinfo.h:428