109 {
return r.dispatch(tag, obj, utcb); }
119template<
typename R >
130 {
return r->dispatch(tag, obj, utcb); }
143template<
typename R,
typename Exc>
257template<
typename LOOP_HOOKS = Ipc_svr::Default_loop_hooks >
271 L4_DEPRECATED(
"Do not specify the UTCB with the constructor. "
272 "Supply it on the loop function if needed.")
288 template<
typename DISPATCH >
294 template<
typename R >
305 template<
typename EXC,
typename R >
317template<
typename L >
326 this->setup_wait(utcb, m);
340template<
typename L >
341template<
typename DISPATCH >
351 res = reply_n_wait(r, &p, utcb);
354 this->error(res, utcb);
359 r = dispatch(res, p, utcb);
C++ interface for capabilities.
Empty implementation of Server_iface.
L4::Cap< void > get_rcv_cap(int) const override
Returns L4::Cap<void>::Invalid, we have no buffer management.
int remove_timeout(Timeout *) override
Returns -L4_ENOSYS, we have no timeout queue.
int alloc_buffer_demand(Demand const &demand) override
Tells the server to allocate buffers for the given demand.
unsigned first_free_br() const
Returns 1 as first free buffer.
int realloc_rcv_cap(int) override
Returns -L4_ENOMEM, we have no buffer management.
int add_timeout(Timeout *, l4_kernel_clock_t) override
Returns -L4_ENOSYS, we have no timeout queue.
void setup_wait(l4_utcb_t *utcb, L4::Ipc_svr::Reply_mode)
Setup wait function for the server loop (Server<>).
Interface for server-loop related functions.
Callback interface for Timeout_queue.
Basic server loop for handling client requests.
l4_msgtag_t reply_n_wait(l4_msgtag_t reply, l4_umword_t *p, l4_utcb_t *)
Internal implementation for reply and wait.
Server()
Initializes the server loop.
L4_NORETURN void internal_loop(DISPATCH dispatch, l4_utcb_t *)
The server loop.
L4_NORETURN void loop(R r, l4_utcb_t *u=l4_utcb())
Server loop with internal exception handling.
L4_NORETURN void loop_noexc(R r, l4_utcb_t *u=l4_utcb())
Server loop without exception handling.
Server(l4_utcb_t *)
Initializes the server loop.
Data type for expressing the needed receive buffers at the server-side of an interface.
bool no_demand() const noexcept
Reply_mode
Reply mode for server loop.
@ Reply_separate
Server shall call reply and wait separately.
@ Reply_compound
Server shall use a compound reply and wait (fast).
unsigned long l4_umword_t
Unsigned machine word.
l4_uint64_t l4_kernel_clock_t
Kernel clock type.
@ L4_INVALID_CAP
Invalid capability selector.
l4_msgtag_t l4_ipc_reply_and_wait(l4_utcb_t *utcb, l4_msgtag_t tag, l4_umword_t *label, l4_timeout_t timeout) L4_NOTHROW
Reply and wait operation (uses the reply capability).
l4_msgtag_t l4_ipc_send(l4_cap_idx_t dest, l4_utcb_t *utcb, l4_msgtag_t tag, l4_timeout_t timeout) L4_NOTHROW
Send a message to an object (do not wait for a reply).
l4_msgtag_t l4_ipc_wait(l4_utcb_t *utcb, l4_umword_t *label, l4_timeout_t timeout) L4_NOTHROW
Wait for an incoming message from any possible sender.
@ L4_SYSF_REPLY
Reply flag.
l4_msgtag_t l4_msgtag(long label, unsigned words, unsigned items, unsigned flags) L4_NOTHROW
Create a message tag from the specified values.
#define L4_IPC_SEND_TIMEOUT_0
0 send timeout
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.
#define L4_NORETURN
Noreturn function attribute.
#define L4_DEPRECATED(s)
Mark symbol deprecated.
L4 low-level kernel interface.
Mix in for LOOP_HOOKS to always use compound reply and wait.
Mix in for LOOP_HOOKS for setup_wait no op.
Mix in for LOOP_HOOKS to use a 0 send and a infinite receive timeout.
R * r
stores a pointer to the registry object
Direct_dispatch(R *r)
Make a direct dispatcher.
Direct dispatch helper, for forwarding dispatch calls to a registry R.
R & r
stores a reference to the registry object
l4_msgtag_t operator()(l4_msgtag_t tag, l4_umword_t obj, l4_utcb_t *utcb)
call operator forwarding to r.dispatch()
Direct_dispatch(R &r)
Make a direct dispatcher.
Dispatch helper wrapping try {} catch {} around the dispatch call.
Exc_dispatch(R r)
Make an exception handling dispatcher.
l4_msgtag_t operator()(l4_msgtag_t tag, l4_umword_t obj, l4_utcb_t *utcb)
Dispatch the call via Direct_dispatch<R>() and handle exceptions.
Mix in for LOOP_HOOKS to ignore IPC errors.
Encapsulation of the buffer-registers block in the UTCB.
l4_umword_t br[L4_UTCB_GENERIC_BUFFERS_SIZE]
Buffer registers.
l4_umword_t bdr
Buffer descriptor.
Message tag data structure.
long label() const L4_NOTHROW
Get the protocol value.
unsigned has_error() const L4_NOTHROW
Test if flags indicate an error.