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 435 of file rm.

Constructor & Destructor Documentation

◆ Unique_region() [1/3]

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

Construct a Unique_region from an address.

No region manager is set.

Parameters
addrThe new address

Definition at line 456 of file rm.

◆ Unique_region() [2/3]

template<typename T>
L4Re::Rm::Unique_region< T >::Unique_region ( T 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 465 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 473 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 498 of file rm.

Member Function Documentation

◆ get()

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

Return the address.

Returns
the address

Definition at line 509 of file rm.

Referenced by L4Re::Util::Event_t< Default_event_payload >::init(), and L4Re::Util::Event_t< Default_event_payload >::init_poll().

Here is the caller graph for this function:

◆ 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 549 of file rm.

◆ 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 481 of file rm.

◆ 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 517 of file rm.

◆ reset()

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

Set new address and region manager.

Parameters
addrThe new address
rmThe new region manager

Definition at line 529 of file rm.


The documentation for this class was generated from the following file:
  • l4/re/rm