L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
L4Re::Rm::Unique_region< T > Class Template Reference

Unique region. More...

#include <rm>

+ Inheritance diagram for L4Re::Rm::Unique_region< T >:
+ Collaboration diagram for L4Re::Rm::Unique_region< T >:

Public Member Functions

 Unique_region () noexcept
 Construct an invalid Unique_region
 
 Unique_region (T addr) noexcept
 Construct a Unique_region from an address.
 
 Unique_region (T addr, L4::Cap< Rm > const &rm) noexcept
 Construct a valid Unique_region from an address and a region manager.
 
 Unique_region (Unique_region &&o) noexcept
 Move-Construct a Unique_region
 
Unique_regionoperator= (Unique_region &&o) noexcept
 Move-assign a Unique_region
 
 ~Unique_region () noexcept
 Destructor.
 
get () const noexcept
 Return the address.
 
release () noexcept
 Return the address and invalidate the Unique_region
 
void reset (T addr, L4::Cap< Rm > const &rm) noexcept
 Set new address and region manager.
 
void reset () noexcept
 Make the Unique_region invalid.
 
bool is_valid () const noexcept
 Check if the Unique_region is valid.
 
operator* () const noexcept
 Dereference the address.
 
operator-> () const noexcept
 Member access for the address.
 

Detailed Description

template<typename T>
class L4Re::Rm::Unique_region< T >

Unique region.

Capture a single region with automatic detach on destruction and unique ownership. Stores the start address and the region-mapper capability internally. A unique region is valid precisely if the internal region-mapper capability is valid. The features for unique ownership and automatic detach are only active for valid unique regions.

Definition at line 434 of file rm.

Constructor & Destructor Documentation

◆ Unique_region() [1/3]

template<typename T >
L4Re::Rm::Unique_region< T >::Unique_region ( addr)
inlineexplicitnoexcept

Construct a Unique_region from an address.

No region manager is set.

Parameters
addrThe new address

Definition at line 455 of file rm.

◆ Unique_region() [2/3]

template<typename T >
L4Re::Rm::Unique_region< T >::Unique_region ( addr,
L4::Cap< Rm > const &  rm 
)
inlinenoexcept

Construct a valid Unique_region from an address and a region manager.

Parameters
addrThe address
rmThe region manager

Definition at line 464 of file rm.

◆ Unique_region() [3/3]

template<typename T >
L4Re::Rm::Unique_region< T >::Unique_region ( Unique_region< T > &&  o)
inlinenoexcept

Move-Construct a Unique_region

Parameters
oL-value reference to other region.

Definition at line 472 of file rm.

◆ ~Unique_region()

template<typename T >
L4Re::Rm::Unique_region< T >::~Unique_region ( )
inlinenoexcept

Destructor.

If the region is valid, call detach.

Definition at line 497 of file rm.

References L4::Cap_base::is_valid().

+ Here is the call graph for this function:

Member Function Documentation

◆ get()

template<typename T >
T L4Re::Rm::Unique_region< T >::get ( ) const
inlinenoexcept

◆ is_valid()

template<typename T >
bool L4Re::Rm::Unique_region< T >::is_valid ( ) const
inlinenoexcept

Check if the Unique_region is valid.

Returns
true iff the Unique_region is valid

Definition at line 548 of file rm.

References L4::Cap_base::is_valid().

+ Here is the call graph for this function:

◆ operator=()

template<typename T >
Unique_region & L4Re::Rm::Unique_region< T >::operator= ( Unique_region< T > &&  o)
inlinenoexcept

Move-assign a Unique_region

Parameters
oL-value reference to region to assign from

Definition at line 480 of file rm.

References L4::Cap_base::is_valid().

+ Here is the call graph for this function:

◆ release()

template<typename T >
T L4Re::Rm::Unique_region< T >::release ( )
inlinenoexcept

Return the address and invalidate the Unique_region

Returns
the address

Definition at line 516 of file rm.

◆ reset()

template<typename T >
void L4Re::Rm::Unique_region< T >::reset ( addr,
L4::Cap< Rm > const &  rm 
)
inlinenoexcept

Set new address and region manager.

Parameters
addrThe new address
rmThe new region manager

Definition at line 528 of file rm.

References L4::Cap_base::is_valid().

+ Here is the call graph for this function:

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