proxygen
|
#include <AtomicStruct.h>
Public Member Functions | |
AtomicStruct ()=default | |
~AtomicStruct ()=default | |
AtomicStruct (AtomicStruct< T > const &)=delete | |
AtomicStruct< T > & | operator= (AtomicStruct< T > const &)=delete |
constexpr | AtomicStruct (T v) noexcept |
bool | is_lock_free () const noexcept |
bool | compare_exchange_strong (T &v0, T v1, std::memory_order mo=std::memory_order_seq_cst) noexcept |
bool | compare_exchange_strong (T &v0, T v1, std::memory_order success, std::memory_order failure) noexcept |
bool | compare_exchange_weak (T &v0, T v1, std::memory_order mo=std::memory_order_seq_cst) noexcept |
bool | compare_exchange_weak (T &v0, T v1, std::memory_order success, std::memory_order failure) noexcept |
T | exchange (T v, std::memory_order mo=std::memory_order_seq_cst) noexcept |
operator T () const noexcept | |
T | load (std::memory_order mo=std::memory_order_seq_cst) const noexcept |
T | operator= (T v) noexcept |
void | store (T v, std::memory_order mo=std::memory_order_seq_cst) noexcept |
Private Types | |
using | Raw = _t< detail::AtomicStructRaw< constexpr_log2_ceil(sizeof(T))>> |
Static Private Member Functions | |
static Raw | encode (T v) noexcept |
static T | decode (Raw d) noexcept |
Private Attributes | |
Atom< Raw > | data |
AtomicStruct<T> work like C++ atomics, but can be used on any POD type <= 8 bytes.
Definition at line 55 of file AtomicStruct.h.
|
private |
Definition at line 57 of file AtomicStruct.h.
|
default |
|
default |
|
delete |
|
inlinenoexcept |
Definition at line 87 of file AtomicStruct.h.
|
inlinenoexcept |
Definition at line 93 of file AtomicStruct.h.
Referenced by folly::IndexedMemPool< T, NumLocalLists_, LocalListLimit_, Atom, Traits >::localPop(), and folly::IndexedMemPool< T, NumLocalLists_, LocalListLimit_, Atom, Traits >::localPush().
|
inlinenoexcept |
Definition at line 100 of file AtomicStruct.h.
|
inlinenoexcept |
Definition at line 113 of file AtomicStruct.h.
Referenced by folly::atomic_shared_ptr< T, Atom, CountedDetail >::putOwnedBase(), and folly::atomic_shared_ptr< T, Atom, CountedDetail >::takeOwnedBase().
|
inlinenoexcept |
Definition at line 120 of file AtomicStruct.h.
|
inlinestaticprivatenoexcept |
Definition at line 75 of file AtomicStruct.h.
|
inlinestaticprivatenoexcept |
Definition at line 67 of file AtomicStruct.h.
|
inlinenoexcept |
Definition at line 133 of file AtomicStruct.h.
|
inlinenoexcept |
Definition at line 89 of file AtomicStruct.h.
|
inlinenoexcept |
Definition at line 141 of file AtomicStruct.h.
Referenced by folly::IndexedMemPool< T, NumLocalLists_, LocalListLimit_, Atom, Traits >::localPop(), folly::IndexedMemPool< T, NumLocalLists_, LocalListLimit_, Atom, Traits >::localPush(), folly::atomic_shared_ptr< T, Atom, CountedDetail >::putOwnedBase(), folly::MemoryIdlerTimeout::runLoopCallback(), folly::atomic_shared_ptr< T, Atom, CountedDetail >::takeOwnedBase(), and TEST().
|
inlinenoexcept |
|
delete |
|
inlinenoexcept |
Definition at line 145 of file AtomicStruct.h.
|
inlinenoexcept |
Definition at line 149 of file AtomicStruct.h.
Referenced by folly::atomic_shared_ptr< T, Atom, CountedDetail >::init().
|
private |
Definition at line 59 of file AtomicStruct.h.