L4Re Operating System Framework
Interface and Usage Documentation
|
Abstract server-side implementation of the L4::Namespace interface. More...
#include <name_space_svr>
Public Member Functions | |
virtual | ~Name_space () |
The destructor of the derived class is responsible for freeing resources. | |
Protected Member Functions | |
virtual Entry * | alloc_dynamic_entry (Name const &n, unsigned flags)=0 |
Allocate a new entry for the given name. | |
virtual void | free_dynamic_entry (Entry *e)=0 |
Free an entry previously allocated with alloc_dynamic_entry(). | |
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. | |
virtual int | copy_receive_cap (L4::Cap< void > *cap)=0 |
Return the receive capability for permanent use. | |
virtual void | free_capability (L4::Cap< void > cap)=0 |
Free a capability previously acquired with copy_receive_cap(). | |
virtual void | free_epiface (L4::Epiface *epiface)=0 |
Free epiface previously acquired with get_epiface(). | |
Abstract server-side implementation of the L4::Namespace interface.
Definition at line 191 of file name_space_svr.
|
protectedpure virtual |
Allocate a new entry for the given name.
n | Name of the entry, must be copied. |
flags | Entry flags, see Obj::Flags. |
This method is called when a new entry was received. It must allocate memory, copy n
out of the receive buffer and wrap everything in an Entry.
Referenced by free_epiface().
|
protectedpure virtual |
Return the receive capability for permanent use.
[out] | cap | Capability slot with the received capability. Must be permanently available until free_capability() is called. |
This method is called when a new entry is registered together with a capability mapping. It must decide whether and where to store the capability and return the final capability slot. Typical implementations return the capability slot in the receive window and allocate a new receive window.
|
protectedpure virtual |
Free a capability previously acquired with copy_receive_cap().
[in] | cap | Capability to free. |
Counterpart of copy_receive_cap. Free the capability slot when the entry is deleted or changed.
Referenced by free_epiface().
|
protectedpure virtual |
Free an entry previously allocated with alloc_dynamic_entry().
e | Entry to free. |
Referenced by free_epiface().
|
protectedpure virtual |
Free epiface previously acquired with get_epiface().
[in] | epiface | Epiface to free. |
Called when an entry that points to an epiface is deleted allowing implementations that hold resources to free them.
References alloc_dynamic_entry(), free_capability(), free_dynamic_entry(), free_epiface(), L4_BASE_TASK_CAP, L4_EEXIST, L4_ENOMEM, and L4Re::Namespace::Overwrite.
Referenced by free_epiface().
|
protectedpure virtual |
Return a pointer to the epiface assigned to a given label.
[in] | data | Label or in the local case the capability slot of the receiving capability. |
[in] | is_local | If true, a local capability slot was supplied, if false the label of a locally bound IPC gate. |
[out] | lo | Pointer to epiface responsible for the capability. |
This method is called when a new entry is registered and some local ID was received for the capability. In this case, the generic implementation needs to get the epiface in order to get the capability.
The callee 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.