30#include <l4/sys/cxx/ipc_varg>
97 static T &&_move(T &
c) {
return static_cast<T &&
>(
c); }
100 S(
S const &) =
delete;
101 S &operator = (
S const &) & =
delete;
109 : u(o.u), t(o.t), f(o.f)
112 S &operator = (
S &&o) &
noexcept
134 : u(utcb), t(l4_factory_create_start_u(obj, target.cap(), u)), f(f)
144 l4_factory_create_commit_u(f, t, u);
160 l4_msgtag_t r = l4_factory_create_commit_u(f, t, u);
172 l4_factory_create_add_int_u(i, &t, u);
182 l4_factory_create_add_uint_u(i, &t, u);
192 void put(
char const *s) &
noexcept
194 l4_factory_create_add_str_u(s, &t, u);
208 l4_factory_create_add_lstr_u(s.s, s.len, &t, u);
216 l4_factory_create_add_nil_u(&t, u);
226 l4_factory_create_add_fpage_u(d, &t, u);
230 S &operator << (T
const &d) &
noexcept
237 S &&operator << (T
const &d) &&
noexcept
276 return S(
cap(), obj, target, utcb);
307 template<
typename OBJ>
310 return S(
cap(), OBJ::Protocol, target, utcb);
351 {
return l4_factory_create_task_u(
cap(), target_cap.
cap(), utcb_area, utcb); }
384 {
return l4_factory_create_factory_u(
cap(), target_cap.
cap(), limit, utcb); }
417 {
return l4_factory_create_gate_u(
cap(), target_cap.
cap(), thread_cap.
cap(), label, utcb); }
L4::Cap related definitions.
l4_cap_idx_t cap() const noexcept
Return capability selector.
C++ interface for capabilities.
Stream class for the create() argument stream.
S(S &&o) noexcept
Move ...
void put(Lstr const &s) &noexcept
Add a pascal string as next argument.
void put(l4_fpage_t d) &noexcept
Add a flex page as next argument.
void put(l4_umword_t i) noexcept
Put a single l4_umword_t as next argument.
~S() noexcept
Commit the operation in the destructor to have a cool syntax for create().
S(l4_cap_idx_t f, long obj, L4::Cap< void > target, l4_utcb_t *utcb) noexcept
Create a stream for a specific create() call.
void put(Nil) &noexcept
Add an empty argument.
void put(char const *s) &noexcept
Add a zero-terminated string as next argument.
void put(l4_mword_t i) noexcept
Put a single l4_mword_t as next argument.
C++ Factory interface, see Factory for the C interface.
l4_msgtag_t create_factory(Cap< Factory > const &target_cap, unsigned long limit, l4_utcb_t *utcb=l4_utcb()) noexcept
Create a new factory.
l4_msgtag_t create_task(Cap< Task > const &target_cap, l4_fpage_t *utcb_area, l4_utcb_t *utcb=l4_utcb()) noexcept
Create a new task.
l4_msgtag_t create_gate(Cap< void > const &target_cap, Cap< Thread > const &thread_cap, l4_umword_t label, l4_utcb_t *utcb=l4_utcb()) noexcept
Create a new IPC gate.
S create(Cap< void > target, long obj, l4_utcb_t *utcb=l4_utcb()) noexcept
Generic create call to the factory.
S create(Cap< OBJ > target, l4_utcb_t *utcb=l4_utcb()) noexcept
Create call for typed capabilities.
Variably sized RPC argument.
Helper class to create an L4Re interface class that is derived from a single base class.
L4::Cap< Class > c() const noexcept
Get the capability to ourselves.
l4_cap_idx_t cap() const noexcept
Return capability selector.
Common factory related definitions.
unsigned long l4_umword_t
Unsigned machine word.
signed long l4_mword_t
Signed machine word.
unsigned long l4_cap_idx_t
Capability selector type.
struct l4_utcb_t l4_utcb_t
Opaque type for the UTCB.
l4_utcb_t * l4_utcb(void) L4_NOTHROW L4_PURE
Get the UTCB address.
Interface Definition Language.
#define L4_INLINE_RPC_NF(res, name, args...)
Define an inline RPC call type (the type only, no callable).
L4 low-level kernel interface.
Special type to add a pascal string into the factory create stream.
Lstr(char const *s, unsigned len) noexcept
unsigned len
The number of characters in the buffer.
char const * s
The character buffer.
Special type to add a void argument into the factory create stream.
RPC attribute for an RPC call with required rights.
Mark an argument as a output value in an RPC signature.
List of RPCs of an interface using a single operation without an opcode.
Message tag data structure.