L4Re - L4 Runtime Environment
L4Re::Util::Names::Name_space Class Referenceabstract

Abstract server-side implementation of the L4::Namespace interface. More...

+ Collaboration diagram for L4Re::Util::Names::Name_space:

Protected Member Functions

virtual Entry * alloc_dynamic_entry (Name const &n, unsigned flags)=0
 Allocate a new entry for the given name. More...
 
virtual void free_dynamic_entry (Entry *e)=0
 Free an entry previously allocated with alloc_dynamic_entry(). More...
 
virtual int get_epiface (l4_umword_t data, bool is_local, L4::Epiface **lo)=0
 Return a pointer to the epiface assigned to a given label. More...
 
virtual int copy_receive_cap (L4::Cap< void > *cap)=0
 Return the receive capability for permanent use. More...
 
virtual void free_capability (L4::Cap< void > cap)=0
 Free a capability previously acquired with copy_receive_cap(). More...
 
virtual void free_epiface (L4::Epiface *epiface)=0
 Free epiface previously acquired with get_epiface(). More...
 

Detailed Description

Abstract server-side implementation of the L4::Namespace interface.

Definition at line 184 of file name_space_svr.

Member Function Documentation

◆ alloc_dynamic_entry()

virtual Entry* L4Re::Util::Names::Name_space::alloc_dynamic_entry ( Name const &  n,
unsigned  flags 
)
protectedpure virtual

Allocate a new entry for the given name.

Parameters
nName of the entry, must be copied.
flagsEntry flags, see Obj::Flags.
Returns
A pointer to the newly allocated entry or NULL on error.

◆ copy_receive_cap()

virtual int L4Re::Util::Names::Name_space::copy_receive_cap ( L4::Cap< void > *  cap)
protectedpure virtual

Return the receive capability for permanent use.

Parameters
[out]capCapability slot with the received capability. Must be permanently available until free_capability() is called.

◆ free_capability()

virtual void L4Re::Util::Names::Name_space::free_capability ( L4::Cap< void >  cap)
protectedpure virtual

Free a capability previously acquired with copy_receive_cap().

Parameters
[in]capCapability to free.

◆ free_dynamic_entry()

virtual void L4Re::Util::Names::Name_space::free_dynamic_entry ( Entry *  e)
protectedpure virtual

Free an entry previously allocated with alloc_dynamic_entry().

Parameters
eEntry to free.

◆ free_epiface()

virtual void L4Re::Util::Names::Name_space::free_epiface ( L4::Epiface *  epiface)
protectedpure virtual

Free epiface previously acquired with get_epiface().

Parameters
[in]epifaceEpiface to free.

Called when an entry that points to an epiface is deleted allowing implementations that hold resources to free them.

◆ get_epiface()

virtual int L4Re::Util::Names::Name_space::get_epiface ( l4_umword_t  data,
bool  is_local,
L4::Epiface **  lo 
)
protectedpure virtual

Return a pointer to the epiface assigned to a given label.

Parameters
[in]dataLabel or in the local case the capability slot of the receiving capability.
[in]is_localIf true, a truly local capability was supplied.
[out]loPointer to epiface responsible for the capability.
Returns
L4_OK if a valid interface could be found or an error message otherwise.

The caller must make sure that the epiface remains valid until free_epiface is called. In particular, the capability slot must not be reallocated as long as the namespace server holds a reference to the epiface.


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