L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
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/util/cap_alloc>
16
17namespace L4Re { namespace Util {
18
42template< typename T >
44 = L4::Detail::Unique_cap_impl<T, L4Re::Util::Smart_cap_auto<L4_FP_ALL_SPACES>>;
46template< typename T >
47using unique_cap [[deprecated("Use L4Re::Util::Unique_cap.")]]
48 = L4::Detail::Unique_cap_impl<T, L4Re::Util::Smart_cap_auto<L4_FP_ALL_SPACES>>;
49
55template< typename T >
58{ return Unique_cap<T>(cap_alloc.alloc<T>()); }
59
87template< typename T >
89 = L4::Detail::Unique_cap_impl<T, L4Re::Util::Smart_cap_auto<L4_FP_DELETE_OBJ>>;
91template< typename T >
92using unique_del_cap [[deprecated("Use L4Re::Util::Unique_del_cap.")]]
93 = L4::Detail::Unique_cap_impl<T, L4Re::Util::Smart_cap_auto<L4_FP_DELETE_OBJ>>;
94
100template< typename T >
103{ return Unique_del_cap<T>(cap_alloc.alloc<T>()); }
104
105}}
106
_Cap_alloc cap_alloc
Capability allocator.
Documentation of the L4 Runtime Environment utility functionality in C++.
Definition l4re.dox:21
Unique_cap< T > make_unique_cap()
Allocate a capability slot and wrap it in an Unique_cap.
Definition unique_cap:56
Unique_del_cap< T > make_unique_del_cap()
Allocate a capability slot and wrap it in an Unique_del_cap.
Definition unique_cap:100
L4::Detail::Unique_cap_impl< T, L4Re::Util::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:87
L4::Detail::Unique_cap_impl< T, L4Re::Util::Smart_cap_auto< L4_FP_ALL_SPACES > > Unique_cap
Unique capability that implements automatic free and unmap of the capability selector.
Definition unique_cap:43
L4Re C++ Interfaces.
Definition cmd_control:14
Capability allocator.