STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Public Attributes | List of all members
_Atomic_base< _Ty, _Bytes > Struct Template Reference
Inheritance diagram for _Atomic_base< _Ty, _Bytes >:
_Atomic_impl< _Bytes >

Public Types

typedef _Atomic_impl< _Bytes > _Mybase
 
typedef _Mybase::_My_int _My_int
 
- Public Types inherited from _Atomic_impl< _Bytes >
typedef _Uint1_t _My_int
 

Public Member Functions

constexpr _Atomic_base (_Ty _Val) _NOEXCEPT
 
 _Atomic_base () _NOEXCEPT=default
 
 _Atomic_base (const _Atomic_base &)=delete
 
_Atomic_baseoperator= (const _Atomic_base &)=delete
 
_Atomic_baseoperator= (const _Atomic_base &) volatile=delete
 
_Ty operator= (_Ty _Right) volatile _NOEXCEPT
 
_Ty operator= (_Ty _Right) _NOEXCEPT
 
bool is_lock_free () const volatile _NOEXCEPT
 
bool is_lock_free () const _NOEXCEPT
 
void store (_Ty _Value, memory_order _Order=memory_order_seq_cst) volatile _NOEXCEPT
 
void store (_Ty _Value, memory_order _Order=memory_order_seq_cst) _NOEXCEPT
 
_Ty load (memory_order _Order=memory_order_seq_cst) const volatile _NOEXCEPT
 
_Ty load (memory_order _Order=memory_order_seq_cst) const _NOEXCEPT
 
 operator _Ty () const volatile _NOEXCEPT
 
 operator _Ty () const _NOEXCEPT
 
_Ty exchange (_Ty _Value, memory_order _Order=memory_order_seq_cst) volatile _NOEXCEPT
 
_Ty exchange (_Ty _Value, memory_order _Order=memory_order_seq_cst) _NOEXCEPT
 
bool compare_exchange_weak (_Ty &_Exp, _Ty _Value, memory_order _Order1, memory_order _Order2) volatile _NOEXCEPT
 
bool compare_exchange_weak (_Ty &_Exp, _Ty _Value, memory_order _Order1, memory_order _Order2) _NOEXCEPT
 
bool compare_exchange_weak (_Ty &_Exp, _Ty _Value, memory_order _Order=memory_order_seq_cst) volatile _NOEXCEPT
 
bool compare_exchange_weak (_Ty &_Exp, _Ty _Value, memory_order _Order=memory_order_seq_cst) _NOEXCEPT
 
bool compare_exchange_strong (_Ty &_Exp, _Ty _Value, memory_order _Order1, memory_order _Order2) volatile _NOEXCEPT
 
bool compare_exchange_strong (_Ty &_Exp, _Ty _Value, memory_order _Order1, memory_order _Order2) _NOEXCEPT
 
bool compare_exchange_strong (_Ty &_Exp, _Ty _Value, memory_order _Order=memory_order_seq_cst) volatile _NOEXCEPT
 
bool compare_exchange_strong (_Ty &_Exp, _Ty _Value, memory_order _Order=memory_order_seq_cst) _NOEXCEPT
 
- Public Member Functions inherited from _Atomic_impl< _Bytes >
constexpr _Atomic_impl () _NOEXCEPT
 
bool _Is_lock_free () const volatile
 
void _Store (void *_Tgt, const void *_Src, memory_order _Order) volatile
 
void _Load (void *_Tgt, const void *_Src, memory_order _Order) const volatile
 
void _Exchange (void *_Left, void *_Right, memory_order _Order) volatile
 
bool _Compare_exchange_weak (void *_Tgt, void *_Exp, const void *_Value, memory_order _Order1, memory_order _Order2) volatile
 
bool _Compare_exchange_strong (void *_Tgt, void *_Exp, const void *_Value, memory_order _Order1, memory_order _Order2) volatile
 

Public Attributes

_Ty _My_val
 

Member Typedef Documentation

template<class _Ty, unsigned _Bytes>
typedef _Mybase::_My_int _Atomic_base< _Ty, _Bytes >::_My_int
template<class _Ty, unsigned _Bytes>
typedef _Atomic_impl<_Bytes> _Atomic_base< _Ty, _Bytes >::_Mybase

Constructor & Destructor Documentation

template<class _Ty, unsigned _Bytes>
constexpr _Atomic_base< _Ty, _Bytes >::_Atomic_base ( _Ty  _Val)
inline
509  : _My_val(_Val)
510  { // construct from _Val, initialization is not an atomic operation
511  }
_In_ int _Val
Definition: vcruntime_string.h:62
_Ty _My_val
Definition: atomic:659
template<class _Ty, unsigned _Bytes>
_Atomic_base< _Ty, _Bytes >::_Atomic_base ( )
default
template<class _Ty, unsigned _Bytes>
_Atomic_base< _Ty, _Bytes >::_Atomic_base ( const _Atomic_base< _Ty, _Bytes > &  )
delete

Member Function Documentation

template<class _Ty, unsigned _Bytes>
bool _Atomic_base< _Ty, _Bytes >::compare_exchange_strong ( _Ty &  _Exp,
_Ty  _Value,
memory_order  _Order1,
memory_order  _Order2 
) volatile
inline
624  { // compare and exchange value stored in *this with *_Exp, _Value
625  return (this->_Compare_exchange_strong(
626  (void *)&_My_val, (void *)&_Exp, (const void *)&_Value,
627  _Order1, _Order2));
628  }
_CRTIMP2_PURE short __CLRCALL_PURE_OR_CDECL _Exp(double *, double, short)
_Ty _My_val
Definition: atomic:659
_In_ int _Value
Definition: setjmp.h:173
bool _Compare_exchange_strong(void *_Tgt, void *_Exp, const void *_Value, memory_order _Order1, memory_order _Order2) volatile
Definition: atomic:301
template<class _Ty, unsigned _Bytes>
bool _Atomic_base< _Ty, _Bytes >::compare_exchange_strong ( _Ty &  _Exp,
_Ty  _Value,
memory_order  _Order1,
memory_order  _Order2 
)
inline
632  { // compare and exchange value stored in *this with *_Exp, _Value
633  return (this->_Compare_exchange_strong(
634  (void *)&_My_val, (void *)&_Exp, (void *)&_Value,
635  _Order1, _Order2));
636  }
_CRTIMP2_PURE short __CLRCALL_PURE_OR_CDECL _Exp(double *, double, short)
_Ty _My_val
Definition: atomic:659
_In_ int _Value
Definition: setjmp.h:173
bool _Compare_exchange_strong(void *_Tgt, void *_Exp, const void *_Value, memory_order _Order1, memory_order _Order2) volatile
Definition: atomic:301
template<class _Ty, unsigned _Bytes>
bool _Atomic_base< _Ty, _Bytes >::compare_exchange_strong ( _Ty &  _Exp,
_Ty  _Value,
memory_order  _Order = memory_order_seq_cst 
) volatile
inline
640  { // compare and exchange value stored in *this with *_Exp, _Value
641  return (compare_exchange_strong(
642  _Exp, _Value, _Order, _Get_memory_order(_Order)));
643  }
_CRTIMP2_PURE short __CLRCALL_PURE_OR_CDECL _Exp(double *, double, short)
_STD_BEGIN memory_order _Get_memory_order(memory_order _Order)
Definition: atomic:39
bool compare_exchange_strong(_Ty &_Exp, _Ty _Value, memory_order _Order1, memory_order _Order2) volatile _NOEXCEPT
Definition: atomic:622
_In_ int _Value
Definition: setjmp.h:173
template<class _Ty, unsigned _Bytes>
bool _Atomic_base< _Ty, _Bytes >::compare_exchange_strong ( _Ty &  _Exp,
_Ty  _Value,
memory_order  _Order = memory_order_seq_cst 
)
inline
647  { // compare and exchange value stored in *this with *_Exp, _Value
648  return (compare_exchange_strong(
649  _Exp, _Value, _Order, _Get_memory_order(_Order)));
650  }
_CRTIMP2_PURE short __CLRCALL_PURE_OR_CDECL _Exp(double *, double, short)
_STD_BEGIN memory_order _Get_memory_order(memory_order _Order)
Definition: atomic:39
bool compare_exchange_strong(_Ty &_Exp, _Ty _Value, memory_order _Order1, memory_order _Order2) volatile _NOEXCEPT
Definition: atomic:622
_In_ int _Value
Definition: setjmp.h:173
template<class _Ty, unsigned _Bytes>
bool _Atomic_base< _Ty, _Bytes >::compare_exchange_weak ( _Ty &  _Exp,
_Ty  _Value,
memory_order  _Order1,
memory_order  _Order2 
) volatile
inline
594  { // compare and exchange value stored in *this with *_Exp, _Value
595  return (this->_Compare_exchange_weak(
596  (void *)&_My_val, (void *)&_Exp, (const void *)&_Value,
597  _Order1, _Order2));
598  }
_CRTIMP2_PURE short __CLRCALL_PURE_OR_CDECL _Exp(double *, double, short)
_Ty _My_val
Definition: atomic:659
_In_ int _Value
Definition: setjmp.h:173
bool _Compare_exchange_weak(void *_Tgt, void *_Exp, const void *_Value, memory_order _Order1, memory_order _Order2) volatile
Definition: atomic:293
template<class _Ty, unsigned _Bytes>
bool _Atomic_base< _Ty, _Bytes >::compare_exchange_weak ( _Ty &  _Exp,
_Ty  _Value,
memory_order  _Order1,
memory_order  _Order2 
)
inline
602  { // compare and exchange value stored in *this with *_Exp, _Value
603  return (this->_Compare_exchange_weak(
604  (void *)&_My_val, (void *)&_Exp, (const void *)&_Value,
605  _Order1, _Order2));
606  }
_CRTIMP2_PURE short __CLRCALL_PURE_OR_CDECL _Exp(double *, double, short)
_Ty _My_val
Definition: atomic:659
_In_ int _Value
Definition: setjmp.h:173
bool _Compare_exchange_weak(void *_Tgt, void *_Exp, const void *_Value, memory_order _Order1, memory_order _Order2) volatile
Definition: atomic:293
template<class _Ty, unsigned _Bytes>
bool _Atomic_base< _Ty, _Bytes >::compare_exchange_weak ( _Ty &  _Exp,
_Ty  _Value,
memory_order  _Order = memory_order_seq_cst 
) volatile
inline
610  { // compare and exchange value stored in *this with *_Exp, _Value
611  return (compare_exchange_weak(
612  _Exp, _Value, _Order, _Get_memory_order(_Order)));
613  }
_CRTIMP2_PURE short __CLRCALL_PURE_OR_CDECL _Exp(double *, double, short)
_STD_BEGIN memory_order _Get_memory_order(memory_order _Order)
Definition: atomic:39
bool compare_exchange_weak(_Ty &_Exp, _Ty _Value, memory_order _Order1, memory_order _Order2) volatile _NOEXCEPT
Definition: atomic:592
_In_ int _Value
Definition: setjmp.h:173
template<class _Ty, unsigned _Bytes>
bool _Atomic_base< _Ty, _Bytes >::compare_exchange_weak ( _Ty &  _Exp,
_Ty  _Value,
memory_order  _Order = memory_order_seq_cst 
)
inline
617  { // compare and exchange value stored in *this with *_Exp, _Value
618  return (compare_exchange_weak(
619  _Exp, _Value, _Order, _Get_memory_order(_Order)));
620  }
_CRTIMP2_PURE short __CLRCALL_PURE_OR_CDECL _Exp(double *, double, short)
_STD_BEGIN memory_order _Get_memory_order(memory_order _Order)
Definition: atomic:39
bool compare_exchange_weak(_Ty &_Exp, _Ty _Value, memory_order _Order1, memory_order _Order2) volatile _NOEXCEPT
Definition: atomic:592
_In_ int _Value
Definition: setjmp.h:173
template<class _Ty, unsigned _Bytes>
_Ty _Atomic_base< _Ty, _Bytes >::exchange ( _Ty  _Value,
memory_order  _Order = memory_order_seq_cst 
) volatile
inline
580  { // exchange value stored in *this with _Value
581  this->_Exchange((void *)&_My_val, (void *)&_Value, _Order);
582  return (_Value);
583  }
void _Exchange(void *_Left, void *_Right, memory_order _Order) volatile
Definition: atomic:288
_Ty _My_val
Definition: atomic:659
_In_ int _Value
Definition: setjmp.h:173
template<class _Ty, unsigned _Bytes>
_Ty _Atomic_base< _Ty, _Bytes >::exchange ( _Ty  _Value,
memory_order  _Order = memory_order_seq_cst 
)
inline
587  { // exchange value stored in *this with _Value
588  this->_Exchange((void *)&_My_val, (void *)&_Value, _Order);
589  return (_Value);
590  }
void _Exchange(void *_Left, void *_Right, memory_order _Order) volatile
Definition: atomic:288
_Ty _My_val
Definition: atomic:659
_In_ int _Value
Definition: setjmp.h:173
template<class _Ty, unsigned _Bytes>
bool _Atomic_base< _Ty, _Bytes >::is_lock_free ( ) const volatile
inline
531  { // return true if operations are lock-free
532  return (this->_Is_lock_free());
533  }
bool _Is_lock_free() const volatile
Definition: atomic:272
template<class _Ty, unsigned _Bytes>
bool _Atomic_base< _Ty, _Bytes >::is_lock_free ( ) const
inline
536  { // return true if operations are lock-free
537  return (this->_Is_lock_free());
538  }
bool _Is_lock_free() const volatile
Definition: atomic:272
template<class _Ty, unsigned _Bytes>
_Ty _Atomic_base< _Ty, _Bytes >::load ( memory_order  _Order = memory_order_seq_cst) const volatile
inline
554  { // return value stored in *this
555  _Ty _Result;
556  this->_Load((void *)&_Result, (const void *)&_My_val, _Order);
557  return (_Result);
558  }
void _Load(void *_Tgt, const void *_Src, memory_order _Order) const volatile
Definition: atomic:282
_Ty _My_val
Definition: atomic:659
template<class _Ty, unsigned _Bytes>
_Ty _Atomic_base< _Ty, _Bytes >::load ( memory_order  _Order = memory_order_seq_cst) const
inline
562  { // return value stored in *this
563  _Ty _Result;
564  this->_Load((void *)&_Result, (const void *)&_My_val, _Order);
565  return (_Result);
566  }
void _Load(void *_Tgt, const void *_Src, memory_order _Order) const volatile
Definition: atomic:282
_Ty _My_val
Definition: atomic:659
template<class _Ty, unsigned _Bytes>
_Atomic_base< _Ty, _Bytes >::operator _Ty ( ) const volatile
inline
569  { // return value stored in *this
570  return (load());
571  }
_Ty load(memory_order _Order=memory_order_seq_cst) const volatile _NOEXCEPT
Definition: atomic:552
template<class _Ty, unsigned _Bytes>
_Atomic_base< _Ty, _Bytes >::operator _Ty ( ) const
inline
574  { // return value stored in *this
575  return (load());
576  }
_Ty load(memory_order _Order=memory_order_seq_cst) const volatile _NOEXCEPT
Definition: atomic:552
template<class _Ty, unsigned _Bytes>
_Atomic_base& _Atomic_base< _Ty, _Bytes >::operator= ( const _Atomic_base< _Ty, _Bytes > &  )
delete
template<class _Ty, unsigned _Bytes>
_Atomic_base& _Atomic_base< _Ty, _Bytes >::operator= ( const _Atomic_base< _Ty, _Bytes > &  ) volatile
delete
template<class _Ty, unsigned _Bytes>
_Ty _Atomic_base< _Ty, _Bytes >::operator= ( _Ty  _Right) volatile
inline
519  { // assign from _Right
520  this->_Store((void *)&_My_val, &_Right, memory_order_seq_cst);
521  return (_Right);
522  }
Definition: xatomic0.h:21
_Ty _My_val
Definition: atomic:659
void _Store(void *_Tgt, const void *_Src, memory_order _Order) volatile
Definition: atomic:277
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty, unsigned _Bytes>
_Ty _Atomic_base< _Ty, _Bytes >::operator= ( _Ty  _Right)
inline
525  { // assign from _Right
526  this->_Store((void *)&_My_val, &_Right, memory_order_seq_cst);
527  return (_Right);
528  }
Definition: xatomic0.h:21
_Ty _My_val
Definition: atomic:659
void _Store(void *_Tgt, const void *_Src, memory_order _Order) volatile
Definition: atomic:277
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty, unsigned _Bytes>
void _Atomic_base< _Ty, _Bytes >::store ( _Ty  _Value,
memory_order  _Order = memory_order_seq_cst 
) volatile
inline
542  { // store _Value into *this
543  this->_Store((void *)&_My_val, &_Value, _Order);
544  }
_Ty _My_val
Definition: atomic:659
void _Store(void *_Tgt, const void *_Src, memory_order _Order) volatile
Definition: atomic:277
_In_ int _Value
Definition: setjmp.h:173
template<class _Ty, unsigned _Bytes>
void _Atomic_base< _Ty, _Bytes >::store ( _Ty  _Value,
memory_order  _Order = memory_order_seq_cst 
)
inline
548  { // store _Value into *this
549  this->_Store((void *)&_My_val, &_Value, _Order);
550  }
_Ty _My_val
Definition: atomic:659
void _Store(void *_Tgt, const void *_Src, memory_order _Order) volatile
Definition: atomic:277
_In_ int _Value
Definition: setjmp.h:173

Member Data Documentation

template<class _Ty, unsigned _Bytes>
_Ty _Atomic_base< _Ty, _Bytes >::_My_val

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