L4Re - L4 Runtime Environment
L4::Server< LOOP_HOOKS > Class Template Reference

Basic server loop for handling client requests. More...

+ Inheritance diagram for L4::Server< LOOP_HOOKS >:
+ Collaboration diagram for L4::Server< LOOP_HOOKS >:

Public Member Functions

 Server (l4_utcb_t *utcb)
 Initializes the server loop. More...
template<typename DISPATCH >
L4_NORETURN void internal_loop (DISPATCH dispatch)
 The server loop. More...
template<typename R >
L4_NORETURN void loop_noexc (R r)
 Server loop without exception handling.
template<typename EXC , typename R >
L4_NORETURN void loop (R r)
 Server loop with internal exception handling. More...

Protected Member Functions

l4_msgtag_t reply_n_wait (l4_msgtag_t reply, l4_umword_t *p)
 Internal implementation for reply and wait.

Detailed Description

template<typename LOOP_HOOKS = Ipc_svr::Default_loop_hooks>
class L4::Server< LOOP_HOOKS >

Basic server loop for handling client requests.

LOOP_HOOKSthe server inherits from LOOP_HOOKS and calls the hooks defined in LOOP_HOOKS in the server loop. See Ipc_svr::Default_loop_hooks, Ipc_svr::Ignore_errors, Ipc_svr::Default_timeout, Ipc_svr::Compound_reply, and Ipc_svr::Br_manager_no_buffers.

This is basically a simple server loop that uses a single message buffer for receiving requests and sending replies. The dispatcher determines how incoming messages are handled.

Definition at line 298 of file ipc_server_loop.

Constructor & Destructor Documentation

◆ Server()

template<typename LOOP_HOOKS = Ipc_svr::Default_loop_hooks>
L4::Server< LOOP_HOOKS >::Server ( l4_utcb_t utcb)

Initializes the server loop.

utcbThe UTCB of the thread running the server loop.

Definition at line 306 of file ipc_server_loop.

References L4_NORETURN.

Member Function Documentation

◆ internal_loop()

template<typename L >
template<typename DISPATCH >
L4_NORETURN void L4::Server< L >::internal_loop ( DISPATCH  dispatch)

The server loop.

This function usually never returns, it waits for incoming messages calls the dispatcher, sends a reply and waits again.

Definition at line 368 of file ipc_server_loop.

References l4_msgtag_t::has_error(), L4_ENOREPLY, and l4_msgtag().

+ Here is the call graph for this function:

◆ loop()

template<typename LOOP_HOOKS = Ipc_svr::Default_loop_hooks>
template<typename EXC , typename R >
L4_NORETURN void L4::Server< LOOP_HOOKS >::loop ( r)

Server loop with internal exception handling.

This server loop translates L4::Runtime_error exceptions into negative error return codes sent to the caller.

Definition at line 331 of file ipc_server_loop.

The documentation for this class was generated from the following file: