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/cap_alloc>
#include <l4/sys/cxx/smart_capability_1x>
namespace L4Re {
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(L4Re::Cap_alloc *ca)
{ return Unique_cap<T>(ca->alloc<T>(), ca); }
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(L4Re::Cap_alloc *ca)
{ return Unique_del_cap<T>(ca->alloc<T>(), ca); }
}
cap_alloc
Abstract capability-allocator interface.
L4Re::Cap_alloc
Capability allocator interface.
Definition cap_alloc:31
L4Re::Cap_alloc::alloc
virtual L4::Cap< void > alloc() noexcept=0
Allocate a capability.
L4Re
L4Re C++ Interfaces.
Definition cmd_control:14
L4Re::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:64
L4Re::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:31
L4Re::make_unique_cap
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
L4Re::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:67
L4Re::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:34
L4Re::make_unique_del_cap
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
smart_capability_1x