14#include <l4/util/util.h>
27Namespace::_query(
char const *name,
unsigned len,
28 L4::Cap<void>
const &target,
33 L4::Cap<Namespace> ns = c();
34 L4::Ipc::Array<char const, unsigned long> _name(len, name);
36 while (_name.length > 0)
38 L4::Ipc::Snd_fpage cap;
40 int err = query_t::call(ns, _name,
41 L4::Ipc::Small_buf(target.cap(),
49 bool const partly = err & Partly_resolved;
52 *local_id = cap.
data();
56 if (partly && iterate)
67 int timeout,
l4_umword_t *local_id,
bool iterate)
const noexcept
84 ret = _query(name, len, target, local_id, iterate);
116 bool iterate)
const noexcept
118 return query(name, __builtin_strlen(name), target,
119 timeout, local_id, iterate);
long query(char const *name, L4::Cap< void > const &cap, int timeout=To_default, l4_umword_t *local_id=0, bool iterate=true) const noexcept
Query the name space for a named object.
long register_obj(char const *name, L4::Ipc::Cap< void > obj, unsigned flags=Rw) const noexcept
Register an object with a name.
long unlink(char const *name)
Remove an entry from the name space.
C++ interface for capabilities.
l4_umword_t data() const noexcept
Return the raw flexpage descriptor.
bool id_received() const noexcept
(Defined for return items only.) Check if an IPC gate label has been received instead of a mapping.
unsigned long l4_umword_t
Unsigned machine word.
@ L4_EINVAL
Invalid argument.
@ L4_RCV_ITEM_LOCAL_ID
The receiver requests to receive a local ID instead of a mapping whenever possible.
#define L4_UNLIKELY(x)
Expression is unlikely to execute.
void l4_sleep(l4_uint32_t ms) L4_NOTHROW
Suspend thread for a period of ms milliseconds.
#define L4_RPC_DEF(name)
Generate the definition of an RPC stub.
int Opcode
Data type for RPC opcodes.
Cap< T > cap_cast(Cap< F > const &c) noexcept
static_cast for capabilities.
Low-level assert implementation.
#define l4_assert(expr)
Low-level assert.