libstdc++
std::atomic< _Tp > Class Template Reference

Public Types

using value_type = _Tp
 

Public Member Functions

constexpr atomic (_Tp __i) noexcept
 
 atomic (const atomic &)=delete
 
bool compare_exchange_strong (_Tp &__e, _Tp __i, memory_order __m=memory_order_seq_cst) noexcept
 
bool compare_exchange_strong (_Tp &__e, _Tp __i, memory_order __m=memory_order_seq_cst) volatile noexcept
 
bool compare_exchange_strong (_Tp &__e, _Tp __i, memory_order __s, memory_order __f) noexcept
 
bool compare_exchange_strong (_Tp &__e, _Tp __i, memory_order __s, memory_order __f) volatile noexcept
 
bool compare_exchange_weak (_Tp &__e, _Tp __i, memory_order __m=memory_order_seq_cst) noexcept
 
bool compare_exchange_weak (_Tp &__e, _Tp __i, memory_order __m=memory_order_seq_cst) volatile noexcept
 
bool compare_exchange_weak (_Tp &__e, _Tp __i, memory_order __s, memory_order __f) noexcept
 
bool compare_exchange_weak (_Tp &__e, _Tp __i, memory_order __s, memory_order __f) volatile noexcept
 
_Tp exchange (_Tp __i, memory_order __m=memory_order_seq_cst) noexcept
 
_Tp exchange (_Tp __i, memory_order __m=memory_order_seq_cst) volatile noexcept
 
bool is_lock_free () const noexcept
 
bool is_lock_free () const volatile noexcept
 
_Tp load (memory_order __m=memory_order_seq_cst) const noexcept
 
_Tp load (memory_order __m=memory_order_seq_cst) const volatile noexcept
 
void notify_all () noexcept
 
void notify_one () noexcept
 
 operator _Tp () const noexcept
 
 operator _Tp () const volatile noexcept
 
_Tp operator= (_Tp __i) noexcept
 
_Tp operator= (_Tp __i) volatile noexcept
 
atomicoperator= (const atomic &) volatile=delete
 
atomicoperator= (const atomic &)=delete
 
void store (_Tp __i, memory_order __m=memory_order_seq_cst) noexcept
 
void store (_Tp __i, memory_order __m=memory_order_seq_cst) volatile noexcept
 
void wait (_Tp __old, memory_order __m=memory_order_seq_cst) const noexcept
 

Static Public Attributes

static constexpr bool is_always_lock_free
 

Detailed Description

template<typename _Tp>
class std::atomic< _Tp >

Generic atomic type, primary class template.

Template Parameters
_TpType to be made atomic, must be trivially copyable.

Definition at line 196 of file atomic.

Member Typedef Documentation

◆ value_type

template<typename _Tp >
using std::atomic< _Tp >::value_type = _Tp

Definition at line 198 of file atomic.

Constructor & Destructor Documentation

◆ atomic()

template<typename _Tp >
constexpr std::atomic< _Tp >::atomic ( _Tp  __i)
inlineconstexprnoexcept

Definition at line 231 of file atomic.

Member Function Documentation

◆ compare_exchange_strong() [1/4]

template<typename _Tp >
bool std::atomic< _Tp >::compare_exchange_strong ( _Tp &  __e,
_Tp  __i,
memory_order  __m = memory_order_seq_cst 
)
inlinenoexcept

Definition at line 380 of file atomic.

◆ compare_exchange_strong() [2/4]

template<typename _Tp >
bool std::atomic< _Tp >::compare_exchange_strong ( _Tp &  __e,
_Tp  __i,
memory_order  __m = memory_order_seq_cst 
) volatile
inlinenoexcept

Definition at line 386 of file atomic.

◆ compare_exchange_strong() [3/4]

template<typename _Tp >
bool std::atomic< _Tp >::compare_exchange_strong ( _Tp &  __e,
_Tp  __i,
memory_order  __s,
memory_order  __f 
)
inlinenoexcept

Definition at line 356 of file atomic.

◆ compare_exchange_strong() [4/4]

template<typename _Tp >
bool std::atomic< _Tp >::compare_exchange_strong ( _Tp &  __e,
_Tp  __i,
memory_order  __s,
memory_order  __f 
) volatile
inlinenoexcept

Definition at line 368 of file atomic.

◆ compare_exchange_weak() [1/4]

template<typename _Tp >
bool std::atomic< _Tp >::compare_exchange_weak ( _Tp &  __e,
_Tp  __i,
memory_order  __m = memory_order_seq_cst 
)
inlinenoexcept

Definition at line 344 of file atomic.

◆ compare_exchange_weak() [2/4]

template<typename _Tp >
bool std::atomic< _Tp >::compare_exchange_weak ( _Tp &  __e,
_Tp  __i,
memory_order  __m = memory_order_seq_cst 
) volatile
inlinenoexcept

Definition at line 350 of file atomic.

◆ compare_exchange_weak() [3/4]

template<typename _Tp >
bool std::atomic< _Tp >::compare_exchange_weak ( _Tp &  __e,
_Tp  __i,
memory_order  __s,
memory_order  __f 
)
inlinenoexcept

Definition at line 320 of file atomic.

◆ compare_exchange_weak() [4/4]

template<typename _Tp >
bool std::atomic< _Tp >::compare_exchange_weak ( _Tp &  __e,
_Tp  __i,
memory_order  __s,
memory_order  __f 
) volatile
inlinenoexcept

Definition at line 332 of file atomic.

◆ exchange() [1/2]

template<typename _Tp >
_Tp std::atomic< _Tp >::exchange ( _Tp  __i,
memory_order  __m = memory_order_seq_cst 
)
inlinenoexcept

Definition at line 299 of file atomic.

◆ exchange() [2/2]

template<typename _Tp >
_Tp std::atomic< _Tp >::exchange ( _Tp  __i,
memory_order  __m = memory_order_seq_cst 
) volatile
inlinenoexcept

Definition at line 309 of file atomic.

◆ is_lock_free() [1/2]

template<typename _Tp >
bool std::atomic< _Tp >::is_lock_free ( ) const
inlinenoexcept

Definition at line 248 of file atomic.

◆ is_lock_free() [2/2]

template<typename _Tp >
bool std::atomic< _Tp >::is_lock_free ( ) const volatile
inlinenoexcept

Definition at line 256 of file atomic.

◆ load() [1/2]

template<typename _Tp >
_Tp std::atomic< _Tp >::load ( memory_order  __m = memory_order_seq_cst) const
inlinenoexcept

Definition at line 281 of file atomic.

◆ load() [2/2]

template<typename _Tp >
_Tp std::atomic< _Tp >::load ( memory_order  __m = memory_order_seq_cst) const volatile
inlinenoexcept

Definition at line 290 of file atomic.

◆ notify_all()

template<typename _Tp >
void std::atomic< _Tp >::notify_all ( )
inlinenoexcept

Definition at line 406 of file atomic.

◆ notify_one()

template<typename _Tp >
void std::atomic< _Tp >::notify_one ( )
inlinenoexcept

Definition at line 402 of file atomic.

◆ operator _Tp() [1/2]

template<typename _Tp >
std::atomic< _Tp >::operator _Tp ( ) const
inlinenoexcept

Definition at line 233 of file atomic.

◆ operator _Tp() [2/2]

template<typename _Tp >
std::atomic< _Tp >::operator _Tp ( ) const volatile
inlinenoexcept

Definition at line 236 of file atomic.

◆ operator=() [1/2]

template<typename _Tp >
_Tp std::atomic< _Tp >::operator= ( _Tp  __i)
inlinenoexcept

Definition at line 240 of file atomic.

◆ operator=() [2/2]

template<typename _Tp >
_Tp std::atomic< _Tp >::operator= ( _Tp  __i) volatile
inlinenoexcept

Definition at line 244 of file atomic.

◆ store() [1/2]

template<typename _Tp >
void std::atomic< _Tp >::store ( _Tp  __i,
memory_order  __m = memory_order_seq_cst 
)
inlinenoexcept

Definition at line 269 of file atomic.

◆ store() [2/2]

template<typename _Tp >
void std::atomic< _Tp >::store ( _Tp  __i,
memory_order  __m = memory_order_seq_cst 
) volatile
inlinenoexcept

Definition at line 275 of file atomic.

◆ wait()

template<typename _Tp >
void std::atomic< _Tp >::wait ( _Tp  __old,
memory_order  __m = memory_order_seq_cst 
) const
inlinenoexcept

Definition at line 393 of file atomic.

Member Data Documentation

◆ is_always_lock_free

template<typename _Tp >
constexpr bool std::atomic< _Tp >::is_always_lock_free
staticconstexpr

Definition at line 264 of file atomic.


The documentation for this class was generated from the following file: