proxygen
AtomicUtil.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017-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 
17 #pragma once
18 
19 #include <atomic>
20 #include <cstdint>
21 
22 namespace folly {
23 
39 template <typename Atomic>
40 bool atomic_fetch_set(
41  Atomic& atomic,
42  std::size_t bit,
43  std::memory_order order = std::memory_order_seq_cst);
44 
55 template <typename Atomic>
57  Atomic& atomic,
58  std::size_t bit,
59  std::memory_order order = std::memory_order_seq_cst);
60 
61 } // namespace folly
62 
—— Concurrent Priority Queue Implementation ——
Definition: AtomicBitSet.h:29
bool atomic_fetch_set(Atomic &atomic, std::size_t bit, std::memory_order mo)
bool atomic_fetch_reset(Atomic &atomic, std::size_t bit, std::memory_order mo)
int order