proxygen
Hazptr-fwd.h
Go to the documentation of this file.
1 /*
2  * Copyright 2018-present Facebook, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #pragma once
17 
18 #include <atomic>
19 #include <memory>
20 
25 
27 #if FOLLY_MOBILE
28 #define FOLLY_HAZPTR_THR_LOCAL false
29 #else
30 #define FOLLY_HAZPTR_THR_LOCAL true
31 #endif
32 
33 namespace folly {
34 
39 
41 template <template <typename> class Atom = std::atomic>
42 class hazptr_rec;
43 
48 
50 template <template <typename> class Atom = std::atomic>
51 class hazptr_obj;
52 
54 template <template <typename> class Atom = std::atomic>
56 
58 template <typename T, typename D>
60 
62 template <
63  typename T,
64  template <typename> class Atom = std::atomic,
65  typename D = std::default_delete<T>>
67 
72 
74 template <typename T, template <typename> class Atom = std::atomic>
76 
78 template <template <typename> class Atom = std::atomic>
80 
82 template <
83  typename T,
84  template <typename> class Atom = std::atomic,
85  typename Deleter = std::default_delete<T>>
87 
92 
94 template <template <typename> class Atom = std::atomic>
96 
98 template <template <typename> class Atom = std::atomic>
99 class hazptr_tc;
100 
102 template <template <typename> class Atom = std::atomic>
104 
106 template <template <typename> class Atom = std::atomic>
108 
110 template <template <typename> class Atom = std::atomic>
112 
117 
119 template <template <typename> class Atom = std::atomic>
121 
123 template <template <typename> class Atom = std::atomic>
125 
127 template <template <typename> class Atom = std::atomic>
130  bool check = true,
131  hazptr_domain<Atom>& domain = default_hazptr_domain<Atom>()) noexcept;
132 
134 template <
135  template <typename> class Atom = std::atomic,
136  typename T,
137  typename D = std::default_delete<T>>
138 void hazptr_retire(T* obj, D reclaim = {});
139 
141 template <template <typename> class Atom = std::atomic>
142 void hazptr_cleanup(
143  hazptr_domain<Atom>& domain = default_hazptr_domain<Atom>()) noexcept;
144 
146 extern hazptr_domain<std::atomic> default_domain;
147 
152 
154 template <template <typename> class Atom = std::atomic>
156 
158 template <template <typename> class Atom = std::atomic>
159 void swap(hazptr_holder<Atom>&, hazptr_holder<Atom>&) noexcept;
160 
162 template <uint8_t M = 1, template <typename> class Atom = std::atomic>
164 
166 template <uint8_t M = 1, template <typename> class Atom = std::atomic>
168 
169 } // namespace folly
void hazptr_retire(T *obj, D reclaim={})
Definition: HazptrDomain.h:378
hazptr_domain< std::atomic > default_domain
Definition: Hazptr.cpp:23
hazptr_domain< Atom > & default_hazptr_domain()
Definition: HazptrDomain.h:363
STL namespace.
folly::std T
—— Concurrent Priority Queue Implementation ——
Definition: AtomicBitSet.h:29
requires E e noexcept(noexcept(s.error(std::move(e))))
hazptr_priv< Atom > & hazptr_priv_tls()
#define D(name, bit)
Definition: CpuId.h:145
hazptr_tc< Atom > & hazptr_tc_tls()
#define Atom
void hazptr_cleanup(hazptr_domain< Atom > &domain=default_hazptr_domain< Atom >()) noexcept
Definition: HazptrDomain.h:384
**Optimized Holders **The template hazptr_array< M > provides most of the functionality *of M hazptr_holder s but with faster construction destruction *for M
Definition: Hazptr.h:104
void swap(exception_wrapper &a, exception_wrapper &b) noexcept
Definition: Hazptr-fwd.h:95
void hazptr_domain_push_retired(hazptr_obj_list< Atom > &l, bool check=true, hazptr_domain< Atom > &domain=default_hazptr_domain< Atom >()) noexcept
Definition: HazptrDomain.h:369
bool check(const dynamic &schema, const dynamic &value, bool check=true)