Loading...
Searching...
No Matches
shared_cap
Go to the documentation of this file.
// vim:set ft=cpp: -*- Mode: C++ -*-
/*
* (c) 2018 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 Shared_cap = L4::Detail::Shared_cap_impl<T, Smart_count_cap<L4_FP_ALL_SPACES>>;
template< typename T >
using shared_cap = L4::Detail::Shared_cap_impl<T, Smart_count_cap<L4_FP_ALL_SPACES>>;
template< typename T >
Shared_cap<T>
make_shared_cap(L4Re::Cap_alloc *ca)
{ return Shared_cap<T>(ca->alloc<T>(), ca); }
template< typename T >
using Shared_del_cap = L4::Detail::Shared_cap_impl<T, Smart_count_cap<L4_FP_DELETE_OBJ>>;
template<typename T>
using shared_del_cap = L4::Detail::Shared_cap_impl<T, Smart_count_cap<L4_FP_DELETE_OBJ>>;
template< typename T >
Shared_del_cap<T>
make_shared_del_cap(L4Re::Cap_alloc *ca)
{ return Shared_del_cap<T>(ca->alloc<T>(), ca); }
} // namespace L4Re
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::shared_cap
L4::Detail::Shared_cap_impl< T, Smart_count_cap< L4_FP_ALL_SPACES > > shared_cap
Shared capability that implements automatic free and unmap of the capability selector.
Definition shared_cap:36
L4Re::shared_del_cap
L4::Detail::Shared_cap_impl< T, Smart_count_cap< L4_FP_DELETE_OBJ > > shared_del_cap
Shared capability that implements automatic free and unmap+delete of the capability selector.
Definition shared_cap:72
L4Re::make_shared_cap
Shared_cap< T > make_shared_cap(L4Re::Cap_alloc *ca)
Allocate a capability slot and wrap it in a Shared_cap.
Definition shared_cap:49
L4Re::make_shared_del_cap
Shared_del_cap< T > make_shared_del_cap(L4Re::Cap_alloc *ca)
Allocate a capability slot and wrap it in a Shared_del_cap.
Definition shared_cap:85
L4Re::Shared_cap
L4::Detail::Shared_cap_impl< T, Smart_count_cap< L4_FP_ALL_SPACES > > Shared_cap
Shared capability that implements automatic free and unmap of the capability selector.
Definition shared_cap:33
L4Re::Shared_del_cap
L4::Detail::Shared_cap_impl< T, Smart_count_cap< L4_FP_DELETE_OBJ > > Shared_del_cap
Shared capability that implements automatic free and unmap+delete of the capability selector.
Definition shared_cap:69
smart_capability_1x