L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
L4::Ipc_svr::Server_iface Class Referenceabstract

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 47 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
timeoutThe timeout object to register.
timeThe 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 L4Re::Util::Br_manager, 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 L4::Ipc_svr::Timeout_queue_hooks< Loop_hooks, 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
demandThe 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 L4Re::Util::Br_manager, and L4::Ipc_svr::Br_manager_no_buffers.

◆ 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
indexThe 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 L4Re::Util::Br_manager, and L4::Ipc_svr::Br_manager_no_buffers.

Referenced by rcv_cap().

+ Here is the caller graph for this function:

◆ rcv_cap() [1/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
indexThe 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 125 of file ipc_epiface.

References get_rcv_cap().

+ Here is the call graph for this function:

◆ rcv_cap() [2/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
indexThe 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 137 of file ipc_epiface.

References 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
indexThe 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 L4Re::Util::Br_manager, and L4::Ipc_svr::Br_manager_no_buffers.

◆ remove_timeout()

virtual int L4::Ipc_svr::Server_iface::remove_timeout ( Timeout timeout)
pure virtual

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