Loading...
Searching...
No Matches
L4::Ipc_svr::Timeout_queue_hooks< HOOKS, BR_MAN > Class Template Reference
The L4Re IPC Framework » Server-Side IPC framework

Loop hooks mixin for integrating a timeout queue into the server loop. More...

`#include <ipc_timeout_queue>`

Inheritance diagram for L4::Ipc_svr::Timeout_queue_hooks< HOOKS, BR_MAN >:
Collaboration diagram for L4::Ipc_svr::Timeout_queue_hooks< HOOKS, BR_MAN >:

## Public Member Functions

l4_timeout_t | timeout ()
| get the time for the next timeout
void | setup_wait (l4_utcb_t *utcb, L4::Ipc_svr::Reply_mode mode)
| setup_wait() for the server loop
L4::Ipc_svr::Reply_mode | before_reply (l4_msgtag_t, l4_utcb_t *)
| server loop hook
int | add_timeout (Timeout *timeout, l4_kernel_clock_t time) override
| Add a timeout to the queue for time time.
int | remove_timeout (Timeout *timeout) override
| Remove timeout from the queue.
Public Member Functions inherited from L4::Ipc_svr::Server_iface
| Server_iface ()
| Make a server interface.
template<typename T>
L4::Cap< T > | rcv_cap (int index) const
| Get given receive buffer as typed capability.
L4::Cap< void > | rcv_cap (int index) const
| Get receive cap with the given index as generic (void) type.
Public Member Functions inherited from L4::Ipc_svr::Br_manager_no_buffers
int | alloc_buffer_demand (Demand const &demand) override
| Tells the server to allocate buffers for the given demand.
L4::Cap< void > | get_rcv_cap (int) const override
| Returns L4::Cap<void>::Invalid, we have no buffer management.
int | realloc_rcv_cap (int) override
| Returns -L4_ENOMEM, we have no buffer management.

## Data Fields

Timeout_queue | queue
| Use this timeout queue.

## Additional Inherited Members

Public Types inherited from L4::Ipc_svr::Server_iface
typedef L4::Type_info::Demand | Demand
| Data type expressing server-side demand for receive buffers.
Protected Member Functions inherited from L4::Ipc_svr::Br_manager_no_buffers
unsigned | first_free_br () const
| Returns 1 as first free buffer.
void | setup_wait (l4_utcb_t *utcb, L4::Ipc_svr::Reply_mode)
| Setup wait function for the server loop (Server<>).

## Detailed Description

template<typename HOOKS, typename BR_MAN = Br_manager_no_buffers>
class L4::Ipc_svr::Timeout_queue_hooks< HOOKS, BR_MAN >

Loop hooks mixin for integrating a timeout queue into the server loop.

Template Parameters

  HOOKS | has to inherit from Timeout_queue_hooks<> and provide the functions now() that has to return the current time.
  BR_MAN | This used as a base class for and provides the API for selecting the buffer register (BR) that is used to store the timeout value. This is usually L4Re::Util::Br_manager or L4::Ipc_svr::Br_manager_no_buffers.

Definition at line 150 of file ipc_timeout_queue.

## Member Function Documentation

## add_timeout()

template<typename HOOKS, typename BR_MAN = Br_manager_no_buffers>

int L4::Ipc_svr::Timeout_queue_hooks< HOOKS, BR_MAN >::add_timeout | ( | Timeout * | timeout,
|  | l4_kernel_clock_t | time )

inlineoverridevirtual

Add a timeout to the queue for time time.

Parameters

  timeout | The timeout object to add into the queue (must not be in any queue currently).
  time | The time when the timeout shall expire.

Precondition
  timeout must not be in any queue.

Note
  The timeout is automatically dequeued before the Timeout::expired() function is called

Implements L4::Ipc_svr::Server_iface.

Definition at line 202 of file ipc_timeout_queue.

References queue, and timeout().

Here is the call graph for this function:

## remove_timeout()

template<typename HOOKS, typename BR_MAN = Br_manager_no_buffers>

int L4::Ipc_svr::Timeout_queue_hooks< HOOKS, BR_MAN >::remove_timeout | ( | Timeout * | timeout | ) |

inlineoverridevirtual

Remove timeout from the queue.

Parameters

  timeout | The timeout object to be removed from the queue.

Note
  This function may be safely called even if the timeout is not currently enqueued.
  in Timeout::expired() the timeout is already dequeued!

Implements L4::Ipc_svr::Server_iface.

Definition at line 215 of file ipc_timeout_queue.

References queue, and timeout().

Here is the call graph for this function:

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

- l4/cxx/ipc_timeout_queue