L4Re - L4 Runtime Environment
L4::Registry_iface Class Referenceabstract

Abstract interface for object registries. More...

+ Inheritance diagram for L4::Registry_iface:
+ Collaboration diagram for L4::Registry_iface:

Public Member Functions

virtual L4::Cap< void > register_obj (L4::Epiface *o, char const *service)=0
 Register an L4::Epiface for an IPC gate available in the applications environment under the name service. More...
 
virtual L4::Cap< void > register_obj (L4::Epiface *o)=0
 Register o as server-side object for synchronous RPC. More...
 
virtual L4::Cap< L4::Irqregister_irq_obj (L4::Epiface *o)=0
 Register o as server-side object for asynchronous IRQs. More...
 
virtual L4::Cap< L4::Rcv_endpointregister_obj (L4::Epiface *o, L4::Cap< L4::Rcv_endpoint > ep)=0
 Register o as server-side object for a pre-allocated capability. More...
 
virtual void unregister_obj (L4::Epiface *o, bool unmap=true)=0
 Unregister the given object o from the server. More...
 

Detailed Description

Abstract interface for object registries.

An object registry allows to register L4::Epiface objects at a server loop either for synchronous RPC messages or for asynchronous IRQ messages.

Definition at line 305 of file ipc_epiface.

Member Function Documentation

◆ register_irq_obj()

virtual L4::Cap<L4::Irq> L4::Registry_iface::register_irq_obj ( L4::Epiface *  o)
pure virtual

Register o as server-side object for asynchronous IRQs.

Parameters
oPointer to an Epiface object that shall be registered as server-side object for IRQs.
Return values
L4::Cap<L4::Irq>Capability to a new IRQ object on success.
L4::Cap<L4::Irq>::InvalidThe allocation of the IRQ has failed.

After successful registration o->obj_cap() will be the capability of the allocated IRQ object.

The function may allocate a capability slot for the object. In that case unregister_obj() is responsible for freeing the slot as well.

Implemented in L4Re::Util::Object_registry.

◆ register_obj() [1/3]

virtual L4::Cap<void> L4::Registry_iface::register_obj ( L4::Epiface *  o,
char const *  service 
)
pure virtual

Register an L4::Epiface for an IPC gate available in the applications environment under the name service.

Parameters
oPointer to an Epiface object that shall be registered.
serviceName of the capability that shall be used to connect o to as a server-side object.
Return values
L4::Cap<void>The capability known as service on success.
L4::Cap<void>::InvalidNo capability with the given name found.

After a successful call to this function o->obj_cap() is equal to the capability in the environment with the name given by service.

Implemented in L4Re::Util::Object_registry.

◆ register_obj() [2/3]

virtual L4::Cap<void> L4::Registry_iface::register_obj ( L4::Epiface *  o)
pure virtual

Register o as server-side object for synchronous RPC.

Parameters
oPointer to an Epiface object that shall be registered as server-side object for RPC.
Return values
L4::Cap<void>A valid capability to a new IPC gate.
L4::Cap<void>::InvalidThe allocation of the IPC gate has failed.

After successful registration o->obj_cap() will be the capability of the allocated IPC gate.

The function may allocate a capability slot for the object. In that case unregister_obj() is responsible for freeing the slot as well.

Implemented in L4Re::Util::Object_registry.

◆ register_obj() [3/3]

virtual L4::Cap<L4::Rcv_endpoint> L4::Registry_iface::register_obj ( L4::Epiface *  o,
L4::Cap< L4::Rcv_endpoint ep 
)
pure virtual

Register o as server-side object for a pre-allocated capability.

Parameters
oPointer to an Epiface object that shall be registered as server-side object.
epCapability to an already allocated capability where o shall be attached as server-side handler. The capability may point to an IPC gate or an IRQ.
Return values
L4::Cap<L4::Rcv_endpoint>Capability ep on success.
L4::Cap<L4::Rcv_endpoint>::InvalidThe IRQ attach operation has failed.

After successful registration o->obj_cap() will be equal to ep.

Implemented in L4Re::Util::Object_registry.

◆ unregister_obj()

virtual void L4::Registry_iface::unregister_obj ( L4::Epiface *  o,
bool  unmap = true 
)
pure virtual

Unregister the given object o from the server.

Parameters
oPointer to the Epiface object that shall be unregistered. The object must have been registered with any of the register methods if Registry_iface.
unmapIf true the capability o->obj_cap() shall be unmapped from the local object space.

The function always unmaps and frees the capability if it was allocated by either Registry_iface::register_irq_obj(L4::Epiface *), or by Registry_iface::register_obj(L4::Epiface *).

Implemented in L4Re::Util::Object_registry.


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