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/cap_alloc>
16
17namespace L4Re {
18
30template< typename T >
32 = L4::Detail::Unique_cap_impl<T, L4Re::Smart_cap_auto<L4_FP_ALL_SPACES>>;
34template< typename T >
35using unique_cap [[deprecated("Use L4Re::Unique_cap.")]]
36 = L4::Detail::Unique_cap_impl<T, L4Re::Smart_cap_auto<L4_FP_ALL_SPACES>>;
37
47template< typename T >
50{ return Unique_cap<T>(ca->alloc<T>(), ca); }
51
65template< typename T >
67 = L4::Detail::Unique_cap_impl<T, L4Re::Smart_cap_auto<L4_FP_DELETE_OBJ>>;
69template<typename T>
70using unique_del_cap [[deprecated("Use L4Re::Unique_del_cap.")]]
71 = L4::Detail::Unique_cap_impl<T, L4Re::Smart_cap_auto<L4_FP_DELETE_OBJ>>;
72
82template< typename T >
85{ return Unique_del_cap<T>(ca->alloc<T>(), ca); }
86
87}
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, L4Re::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:65
L4::Detail::Unique_cap_impl< T, L4Re::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:48
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:82