libstdc++
atomic_base.h File Reference

Go to the source code of this file.

Classes

struct  std::__atomic_base< _ITp >
 
struct  std::__atomic_base< _PTp * >
 
struct  std::__atomic_flag_base
 
struct  std::atomic_flag
 

Namespaces

namespace  std
 

Macros

#define __cpp_lib_atomic_flag_test
 
#define __cpp_lib_atomic_value_initialization
 
#define _GLIBCXX20_INIT(I)
 
#define ATOMIC_FLAG_INIT
 
#define ATOMIC_VAR_INIT(_VI)
 

Typedefs

typedef unsigned char std::__atomic_flag_data_type
 
template<typename _Tp >
using std::__atomic_impl::_Diff = __conditional_t< is_pointer_v< _Tp >, ptrdiff_t, _Val< _Tp > >
 
template<typename _Tp >
using std::__atomic_impl::_Val = remove_volatile_t< _Tp >
 

Enumerations

enum  __memory_order_modifier { __memory_order_mask , __memory_order_modifier_mask , __memory_order_hle_acquire , __memory_order_hle_release }
 
enum class  std::memory_order : int {
  relaxed , consume , acquire , release ,
  acq_rel , seq_cst
}
 

Functions

template<typename _Tp >
_Tp std::__atomic_impl::__add_fetch (_Tp *__ptr, _Diff< _Tp > __i) noexcept
 
template<typename _Tp >
_Tp std::__atomic_impl::__add_fetch_flt (_Tp *__ptr, _Val< _Tp > __i) noexcept
 
template<typename _Tp >
_Tp std::__atomic_impl::__and_fetch (_Tp *__ptr, _Val< _Tp > __i) noexcept
 
constexpr memory_order std::__cmpexch_failure_order (memory_order __m) noexcept
 
constexpr memory_order std::__cmpexch_failure_order2 (memory_order __m) noexcept
 
template<typename _Tp >
_Tp std::__atomic_impl::__fetch_add_flt (_Tp *__ptr, _Val< _Tp > __i, memory_order __m) noexcept
 
template<typename _Tp >
_Tp std::__atomic_impl::__fetch_sub_flt (_Tp *__ptr, _Val< _Tp > __i, memory_order __m) noexcept
 
constexpr bool std::__is_valid_cmpexch_failure_order (memory_order __m) noexcept
 
template<typename _Tp >
_Tp std::__atomic_impl::__or_fetch (_Tp *__ptr, _Val< _Tp > __i) noexcept
 
template<typename _Tp >
_Tp std::__atomic_impl::__sub_fetch (_Tp *__ptr, _Diff< _Tp > __i) noexcept
 
template<typename _Tp >
_Tp std::__atomic_impl::__sub_fetch_flt (_Tp *__ptr, _Val< _Tp > __i) noexcept
 
template<typename _Tp >
_Tp std::__atomic_impl::__xor_fetch (_Tp *__ptr, _Val< _Tp > __i) noexcept
 
void std::atomic_signal_fence (memory_order __m) noexcept
 
void std::atomic_thread_fence (memory_order __m) noexcept
 
template<typename _Tp >
bool std::__atomic_impl::compare_exchange_strong (_Tp *__ptr, _Val< _Tp > &__expected, _Val< _Tp > __desired, memory_order __success, memory_order __failure) noexcept
 
template<typename _Tp >
bool std::__atomic_impl::compare_exchange_weak (_Tp *__ptr, _Val< _Tp > &__expected, _Val< _Tp > __desired, memory_order __success, memory_order __failure) noexcept
 
template<typename _Tp >
_Val< _Tp > std::__atomic_impl::exchange (_Tp *__ptr, _Val< _Tp > __desired, memory_order __m) noexcept
 
template<typename _Tp >
_Tp std::__atomic_impl::fetch_add (_Tp *__ptr, _Diff< _Tp > __i, memory_order __m) noexcept
 
template<typename _Tp >
_Tp std::__atomic_impl::fetch_and (_Tp *__ptr, _Val< _Tp > __i, memory_order __m) noexcept
 
template<typename _Tp >
_Tp std::__atomic_impl::fetch_or (_Tp *__ptr, _Val< _Tp > __i, memory_order __m) noexcept
 
template<typename _Tp >
_Tp std::__atomic_impl::fetch_sub (_Tp *__ptr, _Diff< _Tp > __i, memory_order __m) noexcept
 
template<typename _Tp >
_Tp std::__atomic_impl::fetch_xor (_Tp *__ptr, _Val< _Tp > __i, memory_order __m) noexcept
 
template<size_t _Size, size_t _Align>
bool std::__atomic_impl::is_lock_free () noexcept
 
template<typename _Tp >
_Tp std::kill_dependency (_Tp __y) noexcept
 
template<typename _Tp >
_Val< _Tp > std::__atomic_impl::load (const _Tp *__ptr, memory_order __m) noexcept
 
template<typename _Tp >
void std::__atomic_impl::notify_all (const _Tp *__ptr) noexcept
 
template<typename _Tp >
void std::__atomic_impl::notify_one (const _Tp *__ptr) noexcept
 
constexpr memory_order std::operator& (memory_order __m, __memory_order_modifier __mod)
 
constexpr memory_order std::operator| (memory_order __m, __memory_order_modifier __mod)
 
template<typename _Tp >
void std::__atomic_impl::store (_Tp *__ptr, _Val< _Tp > __t, memory_order __m) noexcept
 
template<typename _Tp >
void std::__atomic_impl::wait (const _Tp *__ptr, _Val< _Tp > __old, memory_order __m=memory_order_seq_cst) noexcept
 

Variables

constexpr memory_order std::memory_order_acq_rel
 
constexpr memory_order std::memory_order_acquire
 
constexpr memory_order std::memory_order_consume
 
constexpr memory_order std::memory_order_relaxed
 
constexpr memory_order std::memory_order_release
 
constexpr memory_order std::memory_order_seq_cst
 

Detailed Description

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include <atomic>.

Definition in file atomic_base.h.

Macro Definition Documentation

◆ __cpp_lib_atomic_flag_test

#define __cpp_lib_atomic_flag_test

Definition at line 222 of file atomic_base.h.

Typedef Documentation

◆ _Diff

template<typename _Tp >
using std::__atomic_impl::_Diff = typedef __conditional_t<is_pointer_v<_Tp>, ptrdiff_t, _Val<_Tp> >

Definition at line 949 of file atomic_base.h.

◆ _Val

template<typename _Tp >
using std::__atomic_impl::_Val = typedef remove_volatile_t<_Tp>

Definition at line 945 of file atomic_base.h.

Function Documentation

◆ __add_fetch()

template<typename _Tp >
_Tp std::__atomic_impl::__add_fetch ( _Tp *  __ptr,
_Diff< _Tp >  __i 
)
inlinenoexcept

Definition at line 1064 of file atomic_base.h.

◆ __add_fetch_flt()

template<typename _Tp >
_Tp std::__atomic_impl::__add_fetch_flt ( _Tp *  __ptr,
_Val< _Tp >  __i 
)
noexcept

Definition at line 1113 of file atomic_base.h.

◆ __and_fetch()

template<typename _Tp >
_Tp std::__atomic_impl::__and_fetch ( _Tp *  __ptr,
_Val< _Tp >  __i 
)
inlinenoexcept

Definition at line 1074 of file atomic_base.h.

◆ __fetch_add_flt()

template<typename _Tp >
_Tp std::__atomic_impl::__fetch_add_flt ( _Tp *  __ptr,
_Val< _Tp >  __i,
memory_order  __m 
)
noexcept

Definition at line 1089 of file atomic_base.h.

◆ __fetch_sub_flt()

template<typename _Tp >
_Tp std::__atomic_impl::__fetch_sub_flt ( _Tp *  __ptr,
_Val< _Tp >  __i,
memory_order  __m 
)
noexcept

Definition at line 1101 of file atomic_base.h.

◆ __or_fetch()

template<typename _Tp >
_Tp std::__atomic_impl::__or_fetch ( _Tp *  __ptr,
_Val< _Tp >  __i 
)
inlinenoexcept

Definition at line 1079 of file atomic_base.h.

◆ __sub_fetch()

template<typename _Tp >
_Tp std::__atomic_impl::__sub_fetch ( _Tp *  __ptr,
_Diff< _Tp >  __i 
)
inlinenoexcept

Definition at line 1069 of file atomic_base.h.

◆ __sub_fetch_flt()

template<typename _Tp >
_Tp std::__atomic_impl::__sub_fetch_flt ( _Tp *  __ptr,
_Val< _Tp >  __i 
)
noexcept

Definition at line 1126 of file atomic_base.h.

◆ __xor_fetch()

template<typename _Tp >
_Tp std::__atomic_impl::__xor_fetch ( _Tp *  __ptr,
_Val< _Tp >  __i 
)
inlinenoexcept

Definition at line 1084 of file atomic_base.h.

◆ compare_exchange_strong()

template<typename _Tp >
bool std::__atomic_impl::compare_exchange_strong ( _Tp *  __ptr,
_Val< _Tp > &  __expected,
_Val< _Tp >  __desired,
memory_order  __success,
memory_order  __failure 
)
inlinenoexcept

Definition at line 999 of file atomic_base.h.

◆ compare_exchange_weak()

template<typename _Tp >
bool std::__atomic_impl::compare_exchange_weak ( _Tp *  __ptr,
_Val< _Tp > &  __expected,
_Val< _Tp >  __desired,
memory_order  __success,
memory_order  __failure 
)
inlinenoexcept

Definition at line 986 of file atomic_base.h.

◆ exchange()

template<typename _Tp >
_Val< _Tp > std::__atomic_impl::exchange ( _Tp *  __ptr,
_Val< _Tp >  __desired,
memory_order  __m 
)
inlinenoexcept

Definition at line 976 of file atomic_base.h.

◆ fetch_add()

template<typename _Tp >
_Tp std::__atomic_impl::fetch_add ( _Tp *  __ptr,
_Diff< _Tp >  __i,
memory_order  __m 
)
inlinenoexcept

Definition at line 1039 of file atomic_base.h.

◆ fetch_and()

template<typename _Tp >
_Tp std::__atomic_impl::fetch_and ( _Tp *  __ptr,
_Val< _Tp >  __i,
memory_order  __m 
)
inlinenoexcept

Definition at line 1049 of file atomic_base.h.

◆ fetch_or()

template<typename _Tp >
_Tp std::__atomic_impl::fetch_or ( _Tp *  __ptr,
_Val< _Tp >  __i,
memory_order  __m 
)
inlinenoexcept

Definition at line 1054 of file atomic_base.h.

◆ fetch_sub()

template<typename _Tp >
_Tp std::__atomic_impl::fetch_sub ( _Tp *  __ptr,
_Diff< _Tp >  __i,
memory_order  __m 
)
inlinenoexcept

Definition at line 1044 of file atomic_base.h.

◆ fetch_xor()

template<typename _Tp >
_Tp std::__atomic_impl::fetch_xor ( _Tp *  __ptr,
_Val< _Tp >  __i,
memory_order  __m 
)
inlinenoexcept

Definition at line 1059 of file atomic_base.h.

◆ is_lock_free()

template<size_t _Size, size_t _Align>
bool std::__atomic_impl::is_lock_free ( )
inlinenoexcept

Definition at line 953 of file atomic_base.h.

◆ load()

template<typename _Tp >
_Val< _Tp > std::__atomic_impl::load ( const _Tp *  __ptr,
memory_order  __m 
)
inlinenoexcept

Definition at line 966 of file atomic_base.h.

◆ notify_all()

template<typename _Tp >
void std::__atomic_impl::notify_all ( const _Tp *  __ptr)
inlinenoexcept

Definition at line 1031 of file atomic_base.h.

◆ notify_one()

template<typename _Tp >
void std::__atomic_impl::notify_one ( const _Tp *  __ptr)
inlinenoexcept

Definition at line 1024 of file atomic_base.h.

◆ store()

template<typename _Tp >
void std::__atomic_impl::store ( _Tp *  __ptr,
_Val< _Tp >  __t,
memory_order  __m 
)
inlinenoexcept

Definition at line 961 of file atomic_base.h.

◆ wait()

template<typename _Tp >
void std::__atomic_impl::wait ( const _Tp *  __ptr,
_Val< _Tp >  __old,
memory_order  __m = memory_order_seq_cst 
)
inlinenoexcept

Definition at line 1013 of file atomic_base.h.