![]() |
L4Re Operating System Framework
Interface and Usage Documentation
|
Buffer-register (BR) manager for L4::Server. More...
#include <br_manager>
Public Member Functions | |
| Br_manager () | |
| Make a buffer-register (BR) manager. | |
| int | alloc_buffer_demand (Demand const &d) override |
| Tells the server to allocate buffers for the given demand. | |
| L4::Cap< void > | get_rcv_cap (int i) const override |
| Get capability slot allocated to the given receive buffer. | |
| int | realloc_rcv_cap (int i) override |
| Allocate a new capability for the given receive buffer. | |
| cxx::Result< L4::Ipc_svr::Server_iface::Mem_window > | get_rcv_mem () noexcept override |
| Take the current memory receive window. | |
| void | set_rcv_cap_flags (unsigned long flags) |
| Set the receive flags for the buffers. | |
| int | add_timeout (L4::Ipc_svr::Timeout *, l4_kernel_clock_t) override |
| No timeouts handled by us. | |
| int | remove_timeout (L4::Ipc_svr::Timeout *) override |
| 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. | |
| virtual cxx::Result< L4::Reply_cap > | take_reply_cap () noexcept |
| Take the currently used reply capability. | |
| 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. | |
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 | |
| using | Demand = L4::Type_info::Demand |
| Data type expressing server-side demand for receive buffers. | |
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 27 of file br_manager.
|
inlineoverridevirtual |
Tells the server to allocate buffers for the given demand.
| 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.
Implements L4::Ipc_svr::Server_iface.
Definition at line 72 of file br_manager.
References L4::Ipc::Gen_fpage::base_x(), L4::Cap_base::cap(), L4Re::Util::cap_alloc, L4::Type_info::Demand::caps, L4::Ipc::Gen_fpage::data(), L4Re::Env::env(), L4_EINVAL, L4_ENOMEM, L4_EOK, L4_ERANGE, l4_fpage(), L4_FPAGE_RWX, l4_is_fpage_valid(), L4::Type_info::Demand::mem, L4::Type_info::Demand::ports, L4Re::Rm::F::Reserved, L4Re::Env::rm(), and L4Re::Rm::F::Search_addr.
|
inlineoverridevirtual |
Get capability slot allocated to the given receive buffer.
| index | The receive buffer index of the expected capability argument (0 <= index < caps registered with alloc_buffer_demand()). |
index < caps registered with alloc_buffer_demand() Implements L4::Ipc_svr::Server_iface.
Definition at line 139 of file br_manager.
References L4::Cap_base::Invalid, and L4_CAP_MASK.
|
inlineoverridevirtualnoexcept |
Take the current memory receive window.
The caller takes the ownership of the memory receive window. A new receive window will be allocated for the next call.
Reimplemented from L4::Ipc_svr::Server_iface.
Definition at line 165 of file br_manager.
References L4::Ipc::Gen_fpage::base_x(), L4::Ipc::Gen_fpage::data(), L4Re::Env::env(), L4_EINVAL, L4_ENOMEM, L4Re::Util::L4_FP_ALL_SPACES, l4_fpage(), L4_FPAGE_RWX, L4Re::Rm::F::Reserved, L4Re::Env::rm(), L4Re::Rm::F::Search_addr, and L4Re::Env::task().
|
inlineoverridevirtual |
Allocate a new capability for the given receive buffer.
| index | The receive buffer index of the expected capability argument (0 <= index < caps registered with alloc_buffer_demand()). |
index < caps registered with alloc_buffer_demand() Implements L4::Ipc_svr::Server_iface.
Definition at line 147 of file br_manager.
References L4::Cap_base::cap(), L4Re::Util::cap_alloc, L4_EINVAL, L4_ENOMEM, and L4_EOK.
|
inline |
Set the receive flags for the buffers.
| flags | New receive capability flags, see l4_msg_item_consts_t. |
Definition at line 200 of file br_manager.
References l4_assert.