Loading...
Searching...
No Matches
L4::Ipc_svr::Server_iface Class Referenceabstract
The L4Re IPC Framework » Server-Side IPC framework

Interface for server-loop related functions. More...

`#include <ipc_epiface>`

Inheritance diagram for L4::Ipc_svr::Server_iface:
Collaboration diagram for L4::Ipc_svr::Server_iface:

## Public Types

typedef L4::Type_info::Demand | Demand
| Data type expressing server-side demand for receive buffers.

## Public Member Functions

| Server_iface ()
| Make a server interface.
virtual int | alloc_buffer_demand (Demand const &demand)=0
| Tells the server to allocate buffers for the given demand.
virtual L4::Cap< void > | get_rcv_cap (int index) const =0
| Get capability slot allocated to the given receive buffer.
virtual int | realloc_rcv_cap (int index)=0
| Allocate a new capability for the given receive buffer.
virtual int | add_timeout (Timeout *timeout, l4_kernel_clock_t time)=0
| Add a timeout to the server internal timeout queue.
virtual int | remove_timeout (Timeout *timeout)=0
| Remove the given timeout from the timer queue.
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.

## Detailed Description

Interface for server-loop related functions.

This interface provides access to high-level server-loop related functions, such as management of receive buffers and timeouts.

Definition at line 36 of file ipc_epiface.

## Member Function Documentation

## add_timeout()

virtual int L4::Ipc_svr::Server_iface::add_timeout | ( | Timeout * | timeout,
|  | l4_kernel_clock_t | time )

pure virtual

Add a timeout to the server internal timeout queue.

Parameters

  timeout | The timeout object to register.
  time | The time (absolute) at which the timeout shall expire.

Precondition
  timeout must not be in any queue.

Returns
  0 on success, 1 if timeout is already expired, < 0 on error.

Implemented in L4::Ipc_svr::Br_manager_no_buffers, L4::Ipc_svr::Timeout_queue_hooks< HOOKS, BR_MAN >, L4::Ipc_svr::Timeout_queue_hooks< Br_manager_timeout_hooks, Br_manager >, and L4Re::Util::Br_manager.

## alloc_buffer_demand()

virtual int L4::Ipc_svr::Server_iface::alloc_buffer_demand | ( | Demand const & | demand | ) |

pure virtual

Tells the server to allocate buffers for the given demand.

Parameters

  demand | The total server-side demand of receive buffers needed for a given interface, see Demand.

This function is not called by user applications directly. Usually the server implementation or the registry implementation calls this function whenever a new object is registered at the server.

Implemented in L4::Ipc_svr::Br_manager_no_buffers, and L4Re::Util::Br_manager.

## get_rcv_cap()

virtual L4::Cap< void > L4::Ipc_svr::Server_iface::get_rcv_cap | ( | int | index | ) | const

pure virtual

Get capability slot allocated to the given receive buffer.

Parameters

  index | The receive buffer index of the expected capability argument (0 <= `index` < `caps` registered with alloc_buffer_demand()).

Precondition
  0 <= `index` < `caps` registered with alloc_buffer_demand()

Returns
  Capability slot currently allocated to the given receive buffer.

Implemented in L4::Ipc_svr::Br_manager_no_buffers, and L4Re::Util::Br_manager.

Referenced by rcv_cap().

Here is the caller graph for this function:

## rcv_cap() [1/2]

L4::Cap< void > L4::Ipc_svr::Server_iface::rcv_cap | ( | int | index | ) | const

inline

Get receive cap with the given index as generic (void) type.

Parameters

  index | The index of the cap receive buffer of the expected capability. (0 <= `index` < `caps` registered with alloc_buffer_demand().)

Returns
  Capability slot currently allocated to the given capability buffer.

Note
  This is a convenience wrapper for get_rcv_cap().

Definition at line 126 of file ipc_epiface.

References get_rcv_cap().

Here is the call graph for this function:

## rcv_cap() [2/2]

template<typename T>

L4::Cap< T > L4::Ipc_svr::Server_iface::rcv_cap | ( | int | index | ) | const

inline

Get given receive buffer as typed capability.

See also
  get_rcv_cap()

Parameters

  index | The receive buffer index of the expected capability argument. (0 <= `index` < `caps` registered with alloc_buffer_demand().)

Precondition
  0 <= `index` < `caps` registered with alloc_buffer_demand()

Returns
  Capability slot currently allocated to the given receive buffer.

Note
  This is a convenience wrapper for get_rcv_cap() to avoid L4::cap_cast<>().

Definition at line 114 of file ipc_epiface.

References L4::cap_cast(), and get_rcv_cap().

Here is the call graph for this function:

## realloc_rcv_cap()

virtual int L4::Ipc_svr::Server_iface::realloc_rcv_cap | ( | int | index | ) |

pure virtual

Allocate a new capability for the given receive buffer.

Parameters

  index | The receive buffer index of the expected capability argument (0 <= `index` < `caps` registered with alloc_buffer_demand()).

Precondition
  0 <= `index` < `caps` registered with alloc_buffer_demand()

Returns
  0 on success, < 0 on error.

Implemented in L4::Ipc_svr::Br_manager_no_buffers, and L4Re::Util::Br_manager.

## remove_timeout()

virtual int L4::Ipc_svr::Server_iface::remove_timeout | ( | Timeout * | timeout | ) |

pure virtual

Remove the given timeout from the timer queue.

Parameters

  timeout | The timout object to remove.

Returns
  0 on success, < 0 on error.

Implemented in L4::Ipc_svr::Br_manager_no_buffers, L4::Ipc_svr::Timeout_queue_hooks< HOOKS, BR_MAN >, L4::Ipc_svr::Timeout_queue_hooks< Br_manager_timeout_hooks, Br_manager >, and L4Re::Util::Br_manager.

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

- l4/sys/cxx/ipc_epiface