L4Re Operating System Framework
Interface and Usage Documentation
|
A registry that manages server objects and their attached IPC gates for a single server loop for a specific thread. More...
#include <object_registry>
Public Member Functions | |
Object_registry (L4::Ipc_svr::Server_iface *sif) | |
Create a registry for the main thread of the task using the default factory. | |
Object_registry (L4::Ipc_svr::Server_iface *sif, L4::Cap< L4::Thread > server, L4::Cap< L4::Factory > factory) | |
Create a registry for arbitrary threads. | |
L4::Cap< void > | register_obj (L4::Epiface *o, char const *service) override |
Register a new server object to a pre-allocated receive endpoint. | |
L4::Cap< void > | register_obj (L4::Epiface *o) override |
Register a new server object on a newly allocated capability. | |
L4::Cap< L4::Irq > | register_irq_obj (L4::Epiface *o) override |
Register a handler for an interrupt. | |
L4::Cap< L4::Rcv_endpoint > | register_obj (L4::Epiface *o, L4::Cap< L4::Rcv_endpoint > ep) override |
Register a handler for an already existing interrupt. | |
void | unregister_obj (L4::Epiface *o, bool unmap=true) override |
Remove a server object from the handler list. | |
Additional Inherited Members | |
Static Public Member Functions inherited from L4::Basic_registry | |
static Value * | find (l4_umword_t label) |
Get the server object for an Ipc_gate label. | |
static l4_msgtag_t | dispatch (l4_msgtag_t tag, l4_umword_t label, l4_utcb_t *utcb) |
The dispatch function called by the server loop. | |
A registry that manages server objects and their attached IPC gates for a single server loop for a specific thread.
This class manages most of the setup of a server object. If necessary, an IPC gate is created, the specified thread is bound to the IPC gate. Incoming IPC is dispatched to the server object based on the label of the IPC gate.
The object registry is also able to manage IRQ endpoints. They require a different method for the object creation. Otherwise they are handled in the same way as IPC gates: a server object is responsible to process the incoming interrupts.
Definition at line 52 of file object_registry.
|
inlineexplicit |
Create a registry for the main thread of the task using the default factory.
sif | Server loop interface. |
Definition at line 78 of file object_registry.
|
inline |
Create a registry for arbitrary threads.
sif | Server loop interface. |
server | Capability to the thread that executes the server objects. |
factory | Capability to a factory object capable of creating new IPC gates. |
Definition at line 92 of file object_registry.
|
inlineoverridevirtual |
Register a handler for an interrupt.
o | Server object that handles IRQs. |
L4::Cap<L4::Irq> | Capability to a new IRQ object on success. |
L4::Cap<L4::Irq>::Invalid | The allocation of the IRQ has failed. |
The IRQ will be newly allocated using the registry's factory object. The caller must call unregister_obj() to free all resources.
Implements L4::Registry_iface.
Definition at line 238 of file object_registry.
|
inlineoverridevirtual |
Register a new server object on a newly allocated capability.
o | Server object that handles IPC requests. |
L4::Cap<void> | A valid capability to a new IPC gate. |
L4::Cap<void>::Invalid | The allocation of the IPC gate has failed. |
The IPC gate will be allocated using the registry's factory. The caller must call unregister_obj() to free all resources.
Implements L4::Registry_iface.
Definition at line 222 of file object_registry.
|
inlineoverridevirtual |
Register a new server object to a pre-allocated receive endpoint.
o | Server object that handles IPC requests. |
service | Name of a pre-allocated receive endpoint. |
L4::Cap<void> | The capability known as service on success. |
L4::Cap<void>::Invalid | No capability with the given name found. |
The interface must be freed with unregister_obj() by the caller to unbind the thread from the capability.
Implements L4::Registry_iface.
Definition at line 205 of file object_registry.
|
inlineoverridevirtual |
Register a handler for an already existing interrupt.
o | Server object that handles the IPC. |
ep | Capability to a receive endpoint, may be a hardware or software interrupt or an IPC gate. |
L4::Cap<L4::Rcv_endpoint> | Capability ep on success. |
L4::Cap<L4::Rcv_endpoint>::Invalid | The IRQ attach operation has failed. |
The interface must be freed with unregister_obj() by the caller to unbind the thread from the capability.
Implements L4::Registry_iface.
Definition at line 260 of file object_registry.
|
inlineoverridevirtual |
Remove a server object from the handler list.
o | Server object to unbind. |
unmap | Specifies if the object capability shall be unmapped (true) or not. The default (true) is to unmap the capability. |
The capability used by the server object will be unmapped if unmap
is true.
Implements L4::Registry_iface.
Definition at line 276 of file object_registry.
References L4::Thread::Modify_senders::add(), L4Re::Util::cap_alloc, L4_FP_ALL_SPACES, L4::Epiface::obj_cap(), and L4::Epiface::set_server().