mn::basic_atomic_gcc< T > Struct Template Reference

Generic atomic type, primary class template. More...

#include <mn_atomic_gcc.hpp>

Public Types

using value_type = T
 
using difference_type = T
 
using self_type = basic_atomic_gcc< value_type >
 

Public Member Functions

 basic_atomic_gcc ()=default
 
 ~basic_atomic_gcc ()=default
 
 basic_atomic_gcc (const self_type &)=delete
 
basic_atomic_gccoperator= (const self_type &)=delete
 
basic_atomic_gccoperator= (const self_type &) volatile=delete
 
constexpr basic_atomic_gcc (value_type value)
 
value_type get ()
 
void store (value_type v, memory_order order=memory_order::SeqCst)
 
value_type load (memory_order order=memory_order::SeqCst) const
 
value_type exchange (value_type v, memory_order order=memory_order::SeqCst)
 
bool compare_exchange_n (value_type &expected, value_type &desired, bool b, memory_order order=memory_order::SeqCst)
 
bool compare_exchange_t (value_type &expected, value_type &desired, memory_order order=memory_order::SeqCst)
 
bool compare_exchange_f (value_type &expected, value_type &desired, memory_order order=memory_order::SeqCst)
 
bool compare_exchange_strong (value_type &expected, value_type &desired, memory_order order=memory_order::SeqCst)
 
bool compare_exchange_weak (value_type &expected, value_type &desired, memory_order order=memory_order::SeqCst)
 
value_type fetch_add (value_type v, memory_order order=memory_order::SeqCst)
 
value_type fetch_sub (value_type v, memory_order order=memory_order::SeqCst)
 
value_type fetch_and (value_type v, memory_order order=memory_order::SeqCst)
 
value_type fetch_or (value_type v, memory_order order=memory_order::SeqCst)
 
value_type fetch_xor (value_type v, memory_order order=memory_order::SeqCst)
 
value_type add_fetch (value_type v, memory_order order=memory_order::SeqCst)
 
value_type sub_fetch (value_type v, memory_order order=memory_order::SeqCst)
 
value_type and_fetch (value_type v, memory_order order=memory_order::SeqCst)
 
value_type or_fetch (value_type v, memory_order order=memory_order::SeqCst)
 
value_type xor_fetch (value_type v, memory_order order=memory_order::SeqCst)
 
bool is_lock_free () const
 
bool is_lock_free () const volatile
 
 operator value_type () const
 
 operator value_type () const volatile
 
value_type operator++ (int)
 
value_type operator-- (int)
 
value_type operator++ ()
 
value_type operator-- ()
 
value_type operator++ (int) volatile
 
value_type operator-- (int) volatile
 
value_type operator++ () volatile
 
value_type operator-- () volatile
 
value_type operator+= (value_type v)
 
value_type operator-= (value_type v)
 
value_type operator&= (value_type v)
 
value_type operator|= (value_type v)
 
value_type operator^= (value_type v)
 
value_type operator= (value_type v)
 
value_type operator= (value_type v) volatile
 

Public Attributes

volatile value_type __tValue
 

Static Public Attributes

static constexpr bool is_always_lock_free = __atomic_always_lock_free(sizeof(T), 0)
 

Detailed Description

template<typename T>
struct mn::basic_atomic_gcc< T >

Generic atomic type, primary class template.

Template Parameters
TType to be made atomic, must be trivally copyable.

Member Typedef Documentation

◆ difference_type

template<typename T >
using mn::basic_atomic_gcc< T >::difference_type = T

◆ self_type

template<typename T >
using mn::basic_atomic_gcc< T >::self_type = basic_atomic_gcc<value_type>

◆ value_type

template<typename T >
using mn::basic_atomic_gcc< T >::value_type = T

Constructor & Destructor Documentation

◆ basic_atomic_gcc() [1/3]

template<typename T >
mn::basic_atomic_gcc< T >::basic_atomic_gcc ( )
default

◆ ~basic_atomic_gcc()

template<typename T >
mn::basic_atomic_gcc< T >::~basic_atomic_gcc ( )
default

◆ basic_atomic_gcc() [2/3]

template<typename T >
mn::basic_atomic_gcc< T >::basic_atomic_gcc ( const self_type )
delete

◆ basic_atomic_gcc() [3/3]

template<typename T >
constexpr mn::basic_atomic_gcc< T >::basic_atomic_gcc ( value_type  value)
inlineconstexpr

Member Function Documentation

◆ add_fetch()

template<typename T >
value_type mn::basic_atomic_gcc< T >::add_fetch ( value_type  v,
memory_order  order = memory_order::SeqCst 
)
inline

◆ and_fetch()

template<typename T >
value_type mn::basic_atomic_gcc< T >::and_fetch ( value_type  v,
memory_order  order = memory_order::SeqCst 
)
inline

◆ compare_exchange_f()

template<typename T >
bool mn::basic_atomic_gcc< T >::compare_exchange_f ( value_type expected,
value_type desired,
memory_order  order = memory_order::SeqCst 
)
inline

◆ compare_exchange_n()

template<typename T >
bool mn::basic_atomic_gcc< T >::compare_exchange_n ( value_type expected,
value_type desired,
bool  b,
memory_order  order = memory_order::SeqCst 
)
inline

◆ compare_exchange_strong()

template<typename T >
bool mn::basic_atomic_gcc< T >::compare_exchange_strong ( value_type expected,
value_type desired,
memory_order  order = memory_order::SeqCst 
)
inline

◆ compare_exchange_t()

template<typename T >
bool mn::basic_atomic_gcc< T >::compare_exchange_t ( value_type expected,
value_type desired,
memory_order  order = memory_order::SeqCst 
)
inline

◆ compare_exchange_weak()

template<typename T >
bool mn::basic_atomic_gcc< T >::compare_exchange_weak ( value_type expected,
value_type desired,
memory_order  order = memory_order::SeqCst 
)
inline

◆ exchange()

template<typename T >
value_type mn::basic_atomic_gcc< T >::exchange ( value_type  v,
memory_order  order = memory_order::SeqCst 
)
inline

◆ fetch_add()

template<typename T >
value_type mn::basic_atomic_gcc< T >::fetch_add ( value_type  v,
memory_order  order = memory_order::SeqCst 
)
inline

◆ fetch_and()

template<typename T >
value_type mn::basic_atomic_gcc< T >::fetch_and ( value_type  v,
memory_order  order = memory_order::SeqCst 
)
inline

◆ fetch_or()

template<typename T >
value_type mn::basic_atomic_gcc< T >::fetch_or ( value_type  v,
memory_order  order = memory_order::SeqCst 
)
inline

◆ fetch_sub()

template<typename T >
value_type mn::basic_atomic_gcc< T >::fetch_sub ( value_type  v,
memory_order  order = memory_order::SeqCst 
)
inline

◆ fetch_xor()

template<typename T >
value_type mn::basic_atomic_gcc< T >::fetch_xor ( value_type  v,
memory_order  order = memory_order::SeqCst 
)
inline

◆ get()

template<typename T >
value_type mn::basic_atomic_gcc< T >::get ( )
inline

◆ is_lock_free() [1/2]

template<typename T >
bool mn::basic_atomic_gcc< T >::is_lock_free ( ) const
inline

◆ is_lock_free() [2/2]

template<typename T >
bool mn::basic_atomic_gcc< T >::is_lock_free ( ) const volatile
inline

◆ load()

template<typename T >
value_type mn::basic_atomic_gcc< T >::load ( memory_order  order = memory_order::SeqCst) const
inline

◆ operator value_type() [1/2]

template<typename T >
mn::basic_atomic_gcc< T >::operator value_type ( ) const
inline

◆ operator value_type() [2/2]

template<typename T >
mn::basic_atomic_gcc< T >::operator value_type ( ) const volatile
inline

◆ operator&=()

template<typename T >
value_type mn::basic_atomic_gcc< T >::operator&= ( value_type  v)
inline

◆ operator++() [1/4]

template<typename T >
value_type mn::basic_atomic_gcc< T >::operator++ ( )
inline

◆ operator++() [2/4]

template<typename T >
value_type mn::basic_atomic_gcc< T >::operator++ ( ) volatile
inline

◆ operator++() [3/4]

template<typename T >
value_type mn::basic_atomic_gcc< T >::operator++ ( int  )
inline

◆ operator++() [4/4]

template<typename T >
value_type mn::basic_atomic_gcc< T >::operator++ ( int  ) volatile
inline

◆ operator+=()

template<typename T >
value_type mn::basic_atomic_gcc< T >::operator+= ( value_type  v)
inline

◆ operator--() [1/4]

template<typename T >
value_type mn::basic_atomic_gcc< T >::operator-- ( )
inline

◆ operator--() [2/4]

template<typename T >
value_type mn::basic_atomic_gcc< T >::operator-- ( ) volatile
inline

◆ operator--() [3/4]

template<typename T >
value_type mn::basic_atomic_gcc< T >::operator-- ( int  )
inline

◆ operator--() [4/4]

template<typename T >
value_type mn::basic_atomic_gcc< T >::operator-- ( int  ) volatile
inline

◆ operator-=()

template<typename T >
value_type mn::basic_atomic_gcc< T >::operator-= ( value_type  v)
inline

◆ operator=() [1/4]

template<typename T >
basic_atomic_gcc& mn::basic_atomic_gcc< T >::operator= ( const self_type ) volatile
delete

◆ operator=() [2/4]

template<typename T >
basic_atomic_gcc& mn::basic_atomic_gcc< T >::operator= ( const self_type )
delete

◆ operator=() [3/4]

template<typename T >
value_type mn::basic_atomic_gcc< T >::operator= ( value_type  v)
inline

◆ operator=() [4/4]

template<typename T >
value_type mn::basic_atomic_gcc< T >::operator= ( value_type  v) volatile
inline

◆ operator^=()

template<typename T >
value_type mn::basic_atomic_gcc< T >::operator^= ( value_type  v)
inline

◆ operator|=()

template<typename T >
value_type mn::basic_atomic_gcc< T >::operator|= ( value_type  v)
inline

◆ or_fetch()

template<typename T >
value_type mn::basic_atomic_gcc< T >::or_fetch ( value_type  v,
memory_order  order = memory_order::SeqCst 
)
inline

◆ store()

template<typename T >
void mn::basic_atomic_gcc< T >::store ( value_type  v,
memory_order  order = memory_order::SeqCst 
)
inline

◆ sub_fetch()

template<typename T >
value_type mn::basic_atomic_gcc< T >::sub_fetch ( value_type  v,
memory_order  order = memory_order::SeqCst 
)
inline

◆ xor_fetch()

template<typename T >
value_type mn::basic_atomic_gcc< T >::xor_fetch ( value_type  v,
memory_order  order = memory_order::SeqCst 
)
inline

Member Data Documentation

◆ __tValue

template<typename T >
volatile value_type mn::basic_atomic_gcc< T >::__tValue

◆ is_always_lock_free

template<typename T >
constexpr bool mn::basic_atomic_gcc< T >::is_always_lock_free = __atomic_always_lock_free(sizeof(T), 0)
staticconstexpr

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