L4Re - L4 Runtime Environment
|
A registry that manages server objects and their attached IPC gates for a single server loop for a specific thread. More...
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. More... | |
Object_registry (L4::Ipc_svr::Server_iface *sif, L4::Cap< L4::Thread > server, L4::Cap< L4::Factory > factory) | |
Create a registry for arbitrary threads. More... | |
L4::Cap< void > | register_obj (L4::Epiface *o, char const *service) override |
Register a new server object to a pre-allocated IPC gate. More... | |
L4::Cap< void > | register_obj (L4::Epiface *o) override |
Register a new server object on a newly allocated capability. More... | |
L4::Cap< L4::Irq > | register_irq_obj (L4::Epiface *o) override |
Register a handler for an interrupt. More... | |
L4::Cap< L4::Irq > | register_irq_obj (L4::Epiface *o, L4::Cap< L4::Irq > const &irq) override |
Register a handler for an already existing interrupt. More... | |
void | unregister_obj (L4::Epiface *o, bool unmap=true) override |
Remove a server object from the handler list. More... | |
Additional Inherited Members | |
![]() | |
static Value * | find (l4_umword_t label) |
Get the server object for an Ipc_gate label. More... | |
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. More... | |
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 51 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 77 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 91 of file object_registry.
References L4::Ipc_svr::Server_iface::alloc_buffer_demand(), L4::Ipc_gate::bind_thread(), L4Re::Env::env(), L4Re::Env::get_cap(), L4::Cap_base::is_valid(), and l4_error().
|
inlineoverridevirtual |
Register a handler for an interrupt.
o | Server object that handles IRQs. |
The IRQ will be newly allocated using the registry's factory object.
Implements L4::Registry_iface.
Definition at line 249 of file object_registry.
|
inlineoverridevirtual |
Register a handler for an already existing interrupt.
o | Server object that handles the interrupts. |
irq | Capability to an IRQ object, may be a hardware or software interrupt. |
Implements L4::Registry_iface.
Definition at line 265 of file object_registry.
|
inlineoverridevirtual |
Register a new server object to a pre-allocated IPC gate.
o | Server object that handles IPC requests. |
service | Name of a pre-allocated IPC gate. |
Implements L4::Registry_iface.
Definition at line 221 of file object_registry.
|
inlineoverridevirtual |
Register a new server object on a newly allocated capability.
o | Server object that handles IPC requests. |
The IPC gate will be allocated using the registry's factory.
Implements L4::Registry_iface.
Definition at line 235 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 282 of file object_registry.
References L4::Thread::Modify_senders::add(), L4Re::Util::cap_alloc, L4Re::Util::Counting_cap_alloc< COUNTERTYPE >::free(), L4_FP_ALL_SPACES, and L4::Thread::modify_senders().