L4Re Operating System Framework
Interface and Usage Documentation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 >
33using Shared_cap = L4::Detail::Shared_cap_impl<T, Smart_count_cap<L4_FP_ALL_SPACES>>;
35template< typename T >
36using shared_cap = L4::Detail::Shared_cap_impl<T, Smart_count_cap<L4_FP_ALL_SPACES>>;
37
47template< typename T >
50{ return Shared_cap<T>(ca->alloc<T>(), ca); }
51
68template< typename T >
69using Shared_del_cap = L4::Detail::Shared_cap_impl<T, Smart_count_cap<L4_FP_DELETE_OBJ>>;
71template<typename T>
72using shared_del_cap = L4::Detail::Shared_cap_impl<T, Smart_count_cap<L4_FP_DELETE_OBJ>>;
73
83template< typename T >
87
88} // 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, 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:49
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
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
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
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