25 typedef T
const **ptr_type;
30 Ret_array(T *v,
unsigned max) : value(v), max(max) {}
35template<
typename A>
struct Elem<
Ret_array<A> >
37 enum { Is_optional =
false };
38 typedef Ret_array<A> type;
39 typedef typename type::ptr_type arg_type;
40 typedef type svr_type;
41 typedef type svr_arg_type;
53template<
typename A>
struct Class< Ret_array<A> > : Class<A>::type {};
54template<
typename A>
struct Direction< Ret_array<A> > :
Dir_out {};
56template<
typename A,
typename CLASS>
57struct Clnt_val_ops<A const *,
Dir_out, CLASS> : Clnt_noops<A const *>
59 using Clnt_noops<A
const *>::from_msg;
60 static int from_msg(
char *msg,
unsigned offset,
unsigned limit,
long ret,
64 arg =
reinterpret_cast<A
const *
>(msg + offset);
68 return offset + ret *
sizeof(A);
72template<
typename A,
typename CLASS>
74 Svr_noops<Ret_array<A> >
76 typedef Ret_array<A> ret_array;
77 using Svr_noops<ret_array>::from_svr;
78 static int from_svr(
char *,
unsigned offset,
unsigned limit,
long ret,
79 ret_array
const &, Dir_out, CLASS)
84 offset +=
sizeof(A) * ret;
88 using Svr_noops<ret_array>::to_svr;
89 static int to_svr(
char *msg,
unsigned offset,
unsigned limit,
90 ret_array &arg, Dir_out, CLASS)
97 arg = ret_array(
reinterpret_cast<A*
>(msg + offset),
98 (limit - offset) /
sizeof(A));
#define L4_UNLIKELY(x)
Expression is unlikely to execute.
#define L4_EXPORT
Attribute to mark functions, variables, and data types as being exported from a library.
IPC Message related functionality.
constexpr bool check_size(unsigned offset, unsigned limit) noexcept
Check if there is enough space for T from offset to limit.
constexpr unsigned long align_to(unsigned long bytes, unsigned long align) noexcept
Pad bytes to the given alignment align (in bytes).
IPC related functionality.
L4 low-level kernel interface.
Marker type for data values.
Marker type for output values.
Type trait defining a valid RPC parameter type.
Defines client-side handling of `MTYPE' as RPC argument.
Dynamically sized output array of type T.