Loading...
Searching...
No Matches
unique_cap
Go to the documentation of this file.
// vim:set ft=cpp: -*- Mode: C++ -*-
/*
* (c) 2017 Alexander Warg <alexander.warg@kernkonzept.com>
*
* License: see LICENSE.spdx (in this directory or the directories above)
*/
#pragma once
#include <l4/re/util/cap_alloc>
#include <l4/sys/cxx/smart_capability_1x>
namespace L4Re { namespace Util {
template< typename T >
using Unique_cap = L4::Detail::Unique_cap_impl<T, Smart_cap_auto<L4_FP_ALL_SPACES>>;
template< typename T >
using unique_cap = L4::Detail::Unique_cap_impl<T, Smart_cap_auto<L4_FP_ALL_SPACES>>;
template< typename T >
Unique_cap<T>
make_unique_cap()
{ return Unique_cap<T>(cap_alloc.alloc<T>()); }
template< typename T >
using Unique_del_cap = L4::Detail::Unique_cap_impl<T, Smart_cap_auto<L4_FP_DELETE_OBJ>>;
template< typename T >
using unique_del_cap = L4::Detail::Unique_cap_impl<T, Smart_cap_auto<L4_FP_DELETE_OBJ>>;
template< typename T >
Unique_del_cap<T>
make_unique_del_cap()
{ return Unique_del_cap<T>(cap_alloc.alloc<T>()); }
}}
L4Re::Util::cap_alloc
_Cap_alloc & cap_alloc
Capability allocator.
L4Re::Util
Documentation of the L4 Runtime Environment utility functionality in C++.
Definition l4re.dox:21
L4Re::Util::make_unique_cap
Unique_cap< T > make_unique_cap()
Allocate a capability slot and wrap it in an Unique_cap.
Definition unique_cap:55
L4Re::Util::Unique_cap
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:43
L4Re::Util::Unique_del_cap
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:86
L4Re::Util::make_unique_del_cap
Unique_del_cap< T > make_unique_del_cap()
Allocate a capability slot and wrap it in an Unique_del_cap.
Definition unique_cap:98
L4Re::Util::unique_cap
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:46
L4Re::Util::unique_del_cap
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:89
L4Re
L4Re C++ Interfaces.
Definition cmd_control:14
smart_capability_1x
cap_alloc
Capability allocator.