L4Re - L4 Runtime Environment
L4Re::Util::Br_manager Class Reference

Buffer-register (BR) manager for L4::Server. More...

+ Inheritance diagram for L4Re::Util::Br_manager:
+ Collaboration diagram for L4Re::Util::Br_manager:

Public Member Functions

 Br_manager ()
 Make a buffer-register (BR) manager.
 
int alloc_buffer_demand (Demand const &d)
 Tells the server to allocate buffers for the given demand. More...
 
L4::Cap< void > get_rcv_cap (int i) const
 Get capability slot allocated to the given receive buffer. More...
 
int realloc_rcv_cap (int i)
 Allocate a new capability for the given receive buffer. More...
 
void set_rcv_cap_flags (unsigned long flags)
 Set the receive flags for the buffers. More...
 
int add_timeout (L4::Ipc_svr::Timeout *, l4_kernel_clock_t)
 No timeouts handled by us.
 
int remove_timeout (L4::Ipc_svr::Timeout *)
 No timeouts handled by us.
 
void setup_wait (l4_utcb_t *utcb, L4::Ipc_svr::Reply_mode)
 setup_wait() used the server loop (L4::Server)
 
- 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. More...
 
L4::Cap< void > rcv_cap (int index) const
 Get receive cap with the given index as generic (void) type. More...
 

Protected Member Functions

unsigned first_free_br () const
 Used for assigning BRs for a timeout.
 

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.
 

Detailed Description

Buffer-register (BR) manager for L4::Server.

Implementation of the L4::Ipc_svr::Server_iface API for managing the server-side receive buffers needed for a set of server objects running within a server.

Definition at line 36 of file br_manager.

Member Function Documentation

◆ alloc_buffer_demand()

int L4Re::Util::Br_manager::alloc_buffer_demand ( Demand const &  demand)
inlinevirtual

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.

Implements L4::Ipc_svr::Server_iface.

Definition at line 50 of file br_manager.

◆ get_rcv_cap()

L4::Cap<void> L4Re::Util::Br_manager::get_rcv_cap ( int  index) const
inlinevirtual

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.

Implements L4::Ipc_svr::Server_iface.

Definition at line 81 of file br_manager.

◆ realloc_rcv_cap()

int L4Re::Util::Br_manager::realloc_rcv_cap ( int  index)
inlinevirtual

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.

Implements L4::Ipc_svr::Server_iface.

Definition at line 89 of file br_manager.

◆ set_rcv_cap_flags()

void L4Re::Util::Br_manager::set_rcv_cap_flags ( unsigned long  flags)
inline

Set the receive flags for the buffers.

Precondition
Must be called before any handlers are registered.
Parameters
flagsNew receive capability flags, see l4_msg_item_consts_t.

Definition at line 113 of file br_manager.


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