L4Re Operating System Framework
Interface and Usage Documentation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
unique_cap
Go to the documentation of this file.
1// vim:set ft=cpp: -*- Mode: C++ -*-
6/*
7 * (c) 2017 Alexander Warg <alexander.warg@kernkonzept.com>
8 *
9 * License: see LICENSE.spdx (in this directory or the directories above)
10 */
11
12#pragma once
13
14#include <l4/re/cap_alloc>
16
17namespace L4Re {
18
30template< typename T >
31using Unique_cap = L4::Detail::Unique_cap_impl<T, Smart_cap_auto<L4_FP_ALL_SPACES>>;
33template< typename T >
34using unique_cap = L4::Detail::Unique_cap_impl<T, Smart_cap_auto<L4_FP_ALL_SPACES>>;
35
45template< typename T >
48{ return Unique_cap<T>(ca->alloc<T>(), ca); }
49
63template< typename T >
64using Unique_del_cap = L4::Detail::Unique_cap_impl<T, Smart_cap_auto<L4_FP_DELETE_OBJ>>;
66template<typename T>
67using unique_del_cap = L4::Detail::Unique_cap_impl<T, Smart_cap_auto<L4_FP_DELETE_OBJ>>;
68
78template< typename T >
82
83}
Abstract capability-allocator interface.
Capability allocator interface.
Definition cap_alloc:31
virtual L4::Cap< void > alloc() noexcept=0
Allocate a capability.
L4Re C++ Interfaces.
Definition cmd_control:14
L4::Detail::Unique_cap_impl< T, Smart_cap_auto< L4_FP_DELETE_OBJ > > Unique_del_cap
Unique capability that implements automatic free and unmap+delete of the capability selector.
Definition unique_cap:64
L4::Detail::Unique_cap_impl< T, Smart_cap_auto< L4_FP_ALL_SPACES > > unique_cap
Unique capability that implements automatic free and unmap of the capability selector.
Definition unique_cap:34
L4::Detail::Unique_cap_impl< T, Smart_cap_auto< L4_FP_ALL_SPACES > > Unique_cap
Unique capability that implements automatic free and unmap of the capability selector.
Definition unique_cap:31
Unique_cap< T > make_unique_cap(L4Re::Cap_alloc *ca)
Allocate a capability slot and wrap it in an Unique_cap.
Definition unique_cap:47
L4::Detail::Unique_cap_impl< T, Smart_cap_auto< L4_FP_DELETE_OBJ > > unique_del_cap
Unique capability that implements automatic free and unmap+delete of the capability selector.
Definition unique_cap:67
Unique_del_cap< T > make_unique_del_cap(L4Re::Cap_alloc *ca)
Allocate a capability slot and wrap it in an Unique_del_cap.
Definition unique_cap:80