L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
L4Re::Util::_Cap_alloc Class Referencefinal

Adapter to expose the cap allocator implementation as L4Re::Cap_alloc compatible class. More...

#include <cap_alloc_impl.h>

+ Inheritance diagram for L4Re::Util::_Cap_alloc:
+ Collaboration diagram for L4Re::Util::_Cap_alloc:

Public Member Functions

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

Detailed Description

Adapter to expose the cap allocator implementation as L4Re::Cap_alloc compatible class.

Not intended to be used in application code.

Definition at line 66 of file cap_alloc_impl.h.

Member Function Documentation

◆ alloc() [1/2]

template<typename T >
L4::Cap< T > L4Re::Util::_Cap_alloc::alloc ( )
inlinevirtualnoexcept

Allocate a capability.

Returns
Capability of type void

Implements L4Re::Cap_alloc.

Definition at line 79 of file cap_alloc_impl.h.

References alloc().

+ Here is the call graph for this function:

◆ alloc() [2/2]

L4::Cap< void > L4Re::Util::_Cap_alloc::alloc ( )
inlineoverridevirtualnoexcept

Allocate a capability.

Returns
Capability of type void

Implements L4Re::Cap_alloc.

Examples
examples/libs/l4re/c++/mem_alloc/ma+rm.cc, examples/libs/l4re/c++/shared_ds/ds_clnt.cc, and examples/libs/l4re/c++/shared_ds/ds_srv.cc.

Definition at line 75 of file cap_alloc_impl.h.

Referenced by alloc(), L4Re::Util::Br_manager::alloc_buffer_demand(), L4Re::Util::make_ref_cap(), L4Re::Util::make_ref_del_cap(), L4Re::Util::make_shared_cap(), L4Re::Util::make_shared_del_cap(), L4Re::Util::make_unique_cap(), L4Re::Util::make_unique_del_cap(), and L4Re::Util::Br_manager::realloc_rcv_cap().

+ Here is the caller graph for this function:

◆ free()

void L4Re::Util::_Cap_alloc::free ( L4::Cap< void >  cap,
l4_cap_idx_t  task = L4_INVALID_CAP,
unsigned  unmap_flags = L4_FP_ALL_SPACES 
)
inlineoverridevirtualnoexcept

Free a capability.

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

Implements L4Re::Cap_alloc.

Examples
examples/libs/l4re/c++/mem_alloc/ma+rm.cc, examples/libs/l4re/c++/shared_ds/ds_clnt.cc, examples/libs/l4re/c++/shared_ds/ds_srv.cc, and examples/libs/l4re/streammap/client.cc.

Definition at line 85 of file cap_alloc_impl.h.

Referenced by L4Re::Util::Smart_cap_auto< Unmap_flags >::free(), and L4Re::Util::Object_registry::unregister_obj().

+ Here is the caller graph for this function:

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