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 * 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:
71
78 {
80 };
81
84 {
85 To_default = 3600000,
87 };
88
92 L4::Ipc::Snd_fpage &snd_cap,
96
122 l4_ret_t query(char const *name, L4::Cap<void> const &cap,
123 int timeout = To_default,
124 l4_umword_t *local_id = 0, bool iterate = true) const noexcept;
125
135 l4_ret_t query(char const *name, unsigned len, L4::Cap<void> const &cap,
136 int timeout = To_default,
137 l4_umword_t *local_id = 0, bool iterate = true) const noexcept;
138
139 L4_RPC_NF(l4_ret_t, register_obj, (unsigned flags,
140 L4::Ipc::Array<char const, unsigned long> name,
141 L4::Ipc::Opt< L4::Ipc::Cap<void> > obj),
142 L4::Ipc::Call_t<L4_CAP_FPAGE_W>);
143
167 l4_ret_t register_obj(char const *name, L4::Ipc::Cap<void> obj,
168 unsigned flags = Rw) const noexcept
169 {
170 return register_obj_t::call(c(), flags,
172 __builtin_strlen(name), name),
173 obj);
174 }
175
176 L4_RPC_NF_OP(3, // backward compatibility opcode
179
193 */
194 l4_ret_t unlink(char const* name)
195 {
196 return unlink_t::call(c(), L4::Ipc::Array<char const, unsigned long>(
197 __builtin_strlen(name), name));
198 }
199
201
202private:
203 l4_ret_t _query(char const *name, unsigned len,
204 L4::Cap<void> const &target, l4_umword_t *local_id,
205 bool iterate) const noexcept;
206
207};
208
209};
L4::Cap related definitions.
Name-space interface.
Definition namespace:52
l4_ret_t register_obj(char const *name, L4::Ipc::Cap< void > obj, unsigned flags=Rw) const noexcept
Register an object with a name.
Definition namespace:167
Query_result_flags
Flags returned by query IPC, only used internally.
Definition namespace:78
@ Partly_resolved
Name was only partly resolved.
Definition namespace:79
l4_ret_t unlink(char const *name)
Remove an entry from the name space.
Definition namespace:193
Register_flags
Flags for registering name spaces.
Definition namespace:58
@ Rs
Read-only + strong.
Definition namespace:61
@ Trusted
Obsolete, do not use.
Definition namespace:64
@ Overwrite
If entry already exists, overwrite it.
Definition namespace:69
@ Strong
Strong.
Definition namespace:63
@ Ro
Read-only.
Definition namespace:59
@ Rws
Read-write + strong.
Definition namespace:62
@ Link
Obsolete, do not use.
Definition namespace:68
@ Rw
Read-write.
Definition namespace:60
Query_timeout
Timeout values for query operation.
Definition namespace:84
@ To_non_blocking
Expect callee to answer immediately.
Definition namespace:86
@ To_default
Default timeout.
Definition namespace:85
C++ interface for capabilities.
Definition capability.h:224
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:214
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:526
#define L4_RPC_NF(res, name, args...)
Define an RPC call type (the type only, no callable).
Definition ipc_iface:511
l4_int16_t l4_ret_t
Return value of an IPC call as well as an RPC call.
Definition types.h:28
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:271
Attribute for defining an optional RPC argument.
Definition ipc_types:137
Standard list of RPCs of an interface.
Definition __typeinfo.h:428