13namespace L4 {
namespace Ipc {
15template<
typename CHAR =
char const,
typename LEN =
unsigned long>
16struct String :
Array<CHAR, LEN>
18 static LEN strlength(CHAR *d) { LEN l = 0;
while (d[l]) ++l;
return l; }
20 String(CHAR *d) :
Array<CHAR, LEN>(strlength(d) + 1, d) {}
21 String(LEN len, CHAR *d) :
Array<CHAR, LEN>(len, d) {}
22 void copy_in(CHAR
const *s)
28 for (i = 0; i < this->length - 1 && s[i]; ++i)
31 this->data[i] = CHAR();
35template<
typename CHAR = char,
typename LEN_TYPE =
unsigned long,
42template<
typename A,
typename LEN>
45 using Base = Svr_val_ops< Array_ref<A, LEN> >;
46 using svr_type =
typename Base::svr_type;
48 static int to_svr_data(
char *msg,
unsigned offset,
unsigned limit,
51 int r = Base::to_svr_data(msg, offset, limit, a);
59 using elem_type = L4::Types::Remove_const_t<A>;
60 const_cast<elem_type*
>(a.data)[a.length - 1] = A();
65template<
typename A,
typename LEN>
68 using Base = Clnt_val_ops<Array<A, LEN>>;
69 using type =
typename Base::type;
71 static int from_msg_data(
char *msg,
unsigned offset,
unsigned limit, type &a)
73 int r = Base::from_msg_data(msg, offset, limit, a);
81 a.data[a.length - 1] = A();
86template<
typename A,
typename LEN>
88template<
typename A,
typename LEN>
unsigned long l4_umword_t
Unsigned machine word.
@ L4_EMSGTOOSHORT
Message too short.
IPC Message related functionality.
IPC related functionality.
L4 low-level kernel interface.
Server-side copy in buffer for Array.
Array data type for dynamically sized arrays in RPCs.
Defines client-side handling of 'MTYPE' as RPC argument.
static int from_msg_data(char *msg, unsigned offset, unsigned limit, MTYPE &arg) noexcept
Copy data from the message to a T client reference (arg must be MTYPE &).
Type trait defining a valid RPC parameter type.
Defines server-side handling of 'MTYPE' as RPC argument.
static int to_svr_data(char *msg, unsigned offset, unsigned limit, MTYPE &arg) noexcept
Copy data from the message to a T server reference (arg must be MTYPE &).
#define L4_UTCB_GENERIC_DATA_SIZE
Total number of message register (MRs) available.