Loading...
Searching...
No Matches
Rm::Unique_region< T > Class Template Reference

Unique region. More...

`#include <rm>`

Inheritance diagram for Rm::Unique_region< T >:
Collaboration diagram for 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_region & | operator= (Unique_region &&o) noexcept
| Move-assign a Unique_region.
| ~Unique_region () noexcept
| Destructor.
T | get () const noexcept
| Return the address.
T | 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.
T | operator* () const noexcept
| Dereference the address.
T | operator-> () const noexcept
| Member access for the address.

## Detailed Description

template<typename T>
class 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

  addr | The 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

  addr | The address
  rm | The 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

  o | L-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.

## 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

  o | L-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

  addr | The new address
  rm | The new region manager

Definition at line 529 of file rm.

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

- l4/re/rm