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

Public Member Functions

 _Atomic (_Ty _Val)
 
 _Atomic () _NOEXCEPT
 
 _Atomic (const _Atomic &)=delete
 
_Atomicoperator= (const _Atomic &)=delete
 
_Atomicoperator= (const _Atomic &) 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 >
 _Atomic_impl ()
 
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
 

Constructor & Destructor Documentation

template<class _Ty, unsigned _Bytes>
_Atomic< _Ty, _Bytes >::_Atomic ( _Ty  _Val)
inline
505  : _My_val(_Val)
506  { // construct from _Val
507  }
_Ty _My_val
Definition: atomic:654
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty, unsigned _Bytes>
_Atomic< _Ty, _Bytes >::_Atomic ( )
inline
510  : _My_val()
511  { /* default constructor */
512  }
_Ty _My_val
Definition: atomic:654
template<class _Ty, unsigned _Bytes>
_Atomic< _Ty, _Bytes >::_Atomic ( const _Atomic< _Ty, _Bytes > &  )
delete

Member Function Documentation

template<class _Ty, unsigned _Bytes>
bool _Atomic< _Ty, _Bytes >::compare_exchange_strong ( _Ty &  _Exp,
_Ty  _Value,
memory_order  _Order1,
memory_order  _Order2 
) volatile
inline
626  { // compare and exchange value stored in *this with *_Exp, _Value
627  return this->_Compare_exchange_strong(
628  (void *)&_My_val, (void *)&_Exp, (const void *)&_Value,
629  _Order1, _Order2);
630  }
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
_CRTIMP2_PURE short __CLRCALL_PURE_OR_CDECL _Exp(double *, double, short)
_Ty _My_val
Definition: atomic:654
bool _Compare_exchange_strong(void *_Tgt, void *_Exp, const void *_Value, memory_order _Order1, memory_order _Order2) volatile
Definition: atomic:300
template<class _Ty, unsigned _Bytes>
bool _Atomic< _Ty, _Bytes >::compare_exchange_strong ( _Ty &  _Exp,
_Ty  _Value,
memory_order  _Order1,
memory_order  _Order2 
)
inline
634  { // compare and exchange value stored in *this with *_Exp, _Value
635  return this->_Compare_exchange_strong(
636  (void *)&_My_val, (void *)&_Exp, (void *)&_Value,
637  _Order1, _Order2);
638  }
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
_CRTIMP2_PURE short __CLRCALL_PURE_OR_CDECL _Exp(double *, double, short)
_Ty _My_val
Definition: atomic:654
bool _Compare_exchange_strong(void *_Tgt, void *_Exp, const void *_Value, memory_order _Order1, memory_order _Order2) volatile
Definition: atomic:300
template<class _Ty, unsigned _Bytes>
bool _Atomic< _Ty, _Bytes >::compare_exchange_strong ( _Ty &  _Exp,
_Ty  _Value,
memory_order  _Order = memory_order_seq_cst 
) volatile
inline
642  { // compare and exchange value stored in *this with *_Exp, _Value
644  _Exp, _Value, _Order, _Get_memory_order(_Order));
645  }
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
bool compare_exchange_strong(_Ty &_Exp, _Ty _Value, memory_order _Order1, memory_order _Order2) volatile _NOEXCEPT
Definition: atomic:624
_CRTIMP2_PURE short __CLRCALL_PURE_OR_CDECL _Exp(double *, double, short)
_STD_BEGIN memory_order _Get_memory_order(memory_order _Order)
Definition: atomic:39
template<class _Ty, unsigned _Bytes>
bool _Atomic< _Ty, _Bytes >::compare_exchange_strong ( _Ty &  _Exp,
_Ty  _Value,
memory_order  _Order = memory_order_seq_cst 
)
inline
649  { // compare and exchange value stored in *this with *_Exp, _Value
651  _Exp, _Value, _Order, _Get_memory_order(_Order));
652  }
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
bool compare_exchange_strong(_Ty &_Exp, _Ty _Value, memory_order _Order1, memory_order _Order2) volatile _NOEXCEPT
Definition: atomic:624
_CRTIMP2_PURE short __CLRCALL_PURE_OR_CDECL _Exp(double *, double, short)
_STD_BEGIN memory_order _Get_memory_order(memory_order _Order)
Definition: atomic:39
template<class _Ty, unsigned _Bytes>
bool _Atomic< _Ty, _Bytes >::compare_exchange_weak ( _Ty &  _Exp,
_Ty  _Value,
memory_order  _Order1,
memory_order  _Order2 
) volatile
inline
596  { // compare and exchange value stored in *this with *_Exp, _Value
597  return this->_Compare_exchange_weak(
598  (void *)&_My_val, (void *)&_Exp, (const void *)&_Value,
599  _Order1, _Order2);
600  }
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
_CRTIMP2_PURE short __CLRCALL_PURE_OR_CDECL _Exp(double *, double, short)
_Ty _My_val
Definition: atomic:654
bool _Compare_exchange_weak(void *_Tgt, void *_Exp, const void *_Value, memory_order _Order1, memory_order _Order2) volatile
Definition: atomic:292
template<class _Ty, unsigned _Bytes>
bool _Atomic< _Ty, _Bytes >::compare_exchange_weak ( _Ty &  _Exp,
_Ty  _Value,
memory_order  _Order1,
memory_order  _Order2 
)
inline
604  { // compare and exchange value stored in *this with *_Exp, _Value
605  return this->_Compare_exchange_weak(
606  (void *)&_My_val, (void *)&_Exp, (const void *)&_Value,
607  _Order1, _Order2);
608  }
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
_CRTIMP2_PURE short __CLRCALL_PURE_OR_CDECL _Exp(double *, double, short)
_Ty _My_val
Definition: atomic:654
bool _Compare_exchange_weak(void *_Tgt, void *_Exp, const void *_Value, memory_order _Order1, memory_order _Order2) volatile
Definition: atomic:292
template<class _Ty, unsigned _Bytes>
bool _Atomic< _Ty, _Bytes >::compare_exchange_weak ( _Ty &  _Exp,
_Ty  _Value,
memory_order  _Order = memory_order_seq_cst 
) volatile
inline
612  { // compare and exchange value stored in *this with *_Exp, _Value
613  return compare_exchange_weak(
614  _Exp, _Value, _Order, _Get_memory_order(_Order));
615  }
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
_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:594
template<class _Ty, unsigned _Bytes>
bool _Atomic< _Ty, _Bytes >::compare_exchange_weak ( _Ty &  _Exp,
_Ty  _Value,
memory_order  _Order = memory_order_seq_cst 
)
inline
619  { // compare and exchange value stored in *this with *_Exp, _Value
620  return compare_exchange_weak(
621  _Exp, _Value, _Order, _Get_memory_order(_Order));
622  }
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
_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:594
template<class _Ty, unsigned _Bytes>
_Ty _Atomic< _Ty, _Bytes >::exchange ( _Ty  _Value,
memory_order  _Order = memory_order_seq_cst 
) volatile
inline
582  { // exchange value stored in *this with _Value
583  this->_Exchange((void *)&_My_val, (void *)&_Value, _Order);
584  return _Value;
585  }
void _Exchange(void *_Left, void *_Right, memory_order _Order) volatile
Definition: atomic:287
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
_Ty _My_val
Definition: atomic:654
template<class _Ty, unsigned _Bytes>
_Ty _Atomic< _Ty, _Bytes >::exchange ( _Ty  _Value,
memory_order  _Order = memory_order_seq_cst 
)
inline
589  { // exchange value stored in *this with _Value
590  this->_Exchange((void *)&_My_val, (void *)&_Value, _Order);
591  return _Value;
592  }
void _Exchange(void *_Left, void *_Right, memory_order _Order) volatile
Definition: atomic:287
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
_Ty _My_val
Definition: atomic:654
template<class _Ty, unsigned _Bytes>
bool _Atomic< _Ty, _Bytes >::is_lock_free ( ) const volatile
inline
533  { // return true if operations are lock-free
534  return this->_Is_lock_free();
535  }
bool _Is_lock_free() const volatile
Definition: atomic:271
template<class _Ty, unsigned _Bytes>
bool _Atomic< _Ty, _Bytes >::is_lock_free ( ) const
inline
538  { // return true if operations are lock-free
539  return this->_Is_lock_free();
540  }
bool _Is_lock_free() const volatile
Definition: atomic:271
template<class _Ty, unsigned _Bytes>
_Ty _Atomic< _Ty, _Bytes >::load ( memory_order  _Order = memory_order_seq_cst) const volatile
inline
556  { // return value stored in *this
557  _Ty _Result;
558  this->_Load((void *)&_Result, (const void *)&_My_val, _Order);
559  return _Result;
560  }
_Ty _My_val
Definition: atomic:654
void _Load(void *_Tgt, const void *_Src, memory_order _Order) const volatile
Definition: atomic:281
template<class _Ty, unsigned _Bytes>
_Ty _Atomic< _Ty, _Bytes >::load ( memory_order  _Order = memory_order_seq_cst) const
inline
564  { // return value stored in *this
565  _Ty _Result;
566  this->_Load((void *)&_Result, (const void *)&_My_val, _Order);
567  return _Result;
568  }
_Ty _My_val
Definition: atomic:654
void _Load(void *_Tgt, const void *_Src, memory_order _Order) const volatile
Definition: atomic:281
template<class _Ty, unsigned _Bytes>
_Atomic< _Ty, _Bytes >::operator _Ty ( ) const volatile
inline
571  { // return value stored in *this
572  return load();
573  }
_Ty load(memory_order _Order=memory_order_seq_cst) const volatile _NOEXCEPT
Definition: atomic:554
template<class _Ty, unsigned _Bytes>
_Atomic< _Ty, _Bytes >::operator _Ty ( ) const
inline
576  { // return value stored in *this
577  return load();
578  }
_Ty load(memory_order _Order=memory_order_seq_cst) const volatile _NOEXCEPT
Definition: atomic:554
template<class _Ty, unsigned _Bytes>
_Atomic& _Atomic< _Ty, _Bytes >::operator= ( const _Atomic< _Ty, _Bytes > &  )
delete
template<class _Ty, unsigned _Bytes>
_Atomic& _Atomic< _Ty, _Bytes >::operator= ( const _Atomic< _Ty, _Bytes > &  ) volatile
delete
template<class _Ty, unsigned _Bytes>
_Ty _Atomic< _Ty, _Bytes >::operator= ( _Ty  _Right) volatile
inline
519  { // assign from _Right
520  this->_Exchange((void *)&_My_val, (void *)&_Right,
522  return _Right;
523  }
void _Exchange(void *_Left, void *_Right, memory_order _Order) volatile
Definition: atomic:287
_Ty _My_val
Definition: atomic:654
Definition: xatomic0.h:25
const _Ty & _Right
Definition: algorithm:4087
template<class _Ty, unsigned _Bytes>
_Ty _Atomic< _Ty, _Bytes >::operator= ( _Ty  _Right)
inline
526  { // assign from _Right
527  this->_Exchange((void *)&_My_val, (void *)&_Right,
529  return _Right;
530  }
void _Exchange(void *_Left, void *_Right, memory_order _Order) volatile
Definition: atomic:287
_Ty _My_val
Definition: atomic:654
Definition: xatomic0.h:25
const _Ty & _Right
Definition: algorithm:4087
template<class _Ty, unsigned _Bytes>
void _Atomic< _Ty, _Bytes >::store ( _Ty  _Value,
memory_order  _Order = memory_order_seq_cst 
) volatile
inline
544  { // store _Value into *this
545  this->_Store(&_My_val, &_Value, _Order);
546  }
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
_Ty _My_val
Definition: atomic:654
void _Store(void *_Tgt, const void *_Src, memory_order _Order) volatile
Definition: atomic:276
template<class _Ty, unsigned _Bytes>
void _Atomic< _Ty, _Bytes >::store ( _Ty  _Value,
memory_order  _Order = memory_order_seq_cst 
)
inline
550  { // store _Value into *this
551  this->_Store(&_My_val, &_Value, _Order);
552  }
_CRTIMP _In_ int _Value
Definition: setjmp.h:190
_Ty _My_val
Definition: atomic:654
void _Store(void *_Tgt, const void *_Src, memory_order _Order) volatile
Definition: atomic:276

Member Data Documentation

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

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