L4Re Operating System Framework – Interface and Usage Documentation
Loading...
Searching...
No Matches
L4Re::Cap_alloc Class Referenceabstract

Capability allocator interface. More...

#include <cap_alloc>

Inherited by L4Re::Cap_alloc_t< ALLOC >.

+ Collaboration diagram for L4Re::Cap_alloc:

Public Member Functions

virtual L4::Cap< void > alloc () noexcept=0
 Allocate a capability.
 
template<typename T >
L4::Cap< T > alloc () noexcept
 Allocate a capability.
 
virtual void free (L4::Cap< void > cap, l4_cap_idx_t task=L4_INVALID_CAP, unsigned unmap_flags=L4_FP_ALL_SPACES) noexcept=0
 Free a capability.
 
virtual ~Cap_alloc ()=0
 Destructor.
 

Static Public Member Functions

template<typename CAP_ALLOC >
static L4Re::Cap_allocget_cap_alloc (CAP_ALLOC &ca)
 Construct an instance of a capability allocator.
 

Detailed Description

Capability allocator interface.

Definition at line 41 of file cap_alloc.

Member Function Documentation

◆ alloc() [1/2]

template<typename T >
L4::Cap< T > L4Re::Cap_alloc::alloc ( )
inlinenoexcept

Allocate a capability.

Returns
Capability of type T

Definition at line 64 of file cap_alloc.

References alloc().

+ Here is the call graph for this function:

◆ alloc() [2/2]

virtual L4::Cap< void > L4Re::Cap_alloc::alloc ( )
pure virtualnoexcept

Allocate a capability.

Returns
Capability of type void

Referenced by alloc(), L4Re::make_shared_cap(), L4Re::make_shared_del_cap(), L4Re::make_unique_cap(), and L4Re::make_unique_del_cap().

+ Here is the caller graph for this function:

◆ free()

virtual void L4Re::Cap_alloc::free ( L4::Cap< void >  cap,
l4_cap_idx_t  task = L4_INVALID_CAP,
unsigned  unmap_flags = L4_FP_ALL_SPACES 
)
pure virtualnoexcept

Free a capability.

Parameters
capCapability to free.
taskIf set, task to unmap the capability from.
unmap_flagsFlags for unmap, see l4_unmap_flags_t.

◆ get_cap_alloc()

template<typename CAP_ALLOC >
static L4Re::Cap_alloc * L4Re::Cap_alloc::get_cap_alloc ( CAP_ALLOC &  ca)
inlinestatic

Construct an instance of a capability allocator.

Parameters
caCapability allocator
Returns
Instance of a capability allocator.

Definition at line 90 of file cap_alloc.

References L4_FP_ALL_SPACES, and L4_INVALID_CAP.


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