L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
shared_cap
Go to the documentation of this file.
1// vim:set ft=cpp: -*- Mode: C++ -*-
6/*
7 * (c) 2018 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
32template< typename T >
34 = L4::Detail::Shared_cap_impl<T, L4Re::Smart_count_cap<L4_FP_ALL_SPACES>>;
36template< typename T >
37using shared_cap [[deprecated("Use L4Re::Shared_cap.")]]
38 = L4::Detail::Shared_cap_impl<T, L4Re::Smart_count_cap<L4_FP_ALL_SPACES>>;
39
49template< typename T >
52{ return Shared_cap<T>(ca->alloc<T>(), ca); }
53
70template< typename T >
72 = L4::Detail::Shared_cap_impl<T, L4Re::Smart_count_cap<L4_FP_DELETE_OBJ>>;
74template<typename T>
75using shared_del_cap [[deprecated("Use L4Re::Shared_del_cap.")]]
76 = L4::Detail::Shared_cap_impl<T, L4Re::Smart_count_cap<L4_FP_DELETE_OBJ>>;
77
87template< typename T >
90{ return Shared_del_cap<T>(ca->alloc<T>(), ca); }
91
92} // namespace L4Re
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::Shared_cap_impl< T, L4Re::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
Shared_cap< T > make_shared_cap(L4Re::Cap_alloc *ca)
Allocate a capability slot and wrap it in a Shared_cap.
Definition shared_cap:50
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:87
L4::Detail::Shared_cap_impl< T, L4Re::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:70