template <class Ty> inline bool atomic_compare_exchange_weak_explicit( volatile atomic<Ty> *Atom, Ty *Exp, Ty Value, memory_order Order1, memory_order Order2 ) _NOEXCEPT; template <class Ty> inline bool atomic_compare_exchange_weak_explicit( atomic<Ty> *Atom, Ty *Exp, Ty Value, memory...
[ atomic_compare_exchange_weak_explicit (Atomic operations) - C 中文开发手册 在头文件<stdatomic.h>中定义_Bool atomic_compare_exchange_strong(volatile A * obj,C * expected,C desired);(1)(自C11以来)_Bool atomic_compare_exchange_weak(volatile A * obj,C * expected,C desired);(2)(...
atomic_compare_exchange_weak_explicit (Atomic operations) - C 中文开发手册 在头文件<stdatomic.h>中定义 _Bool atomic_compare_exchange_strong(volatile A * obj,C * expected,C desired); (1) (自C11以来) _Bool atomic_compare_exchange_weak(volatile A * obj,C * expected,C desired); (...
template< class T > bool atomic_compare_exchange_weak_explicit( std::atomic<T>* obj, T* expected, T desired, std::memory_order succ, std::memory_order fail ); template< class T > bool atomic_compare_exchange_weak_explicit( volatile std::atomic<T>* obj, T* expected, T desired...
bool atomic_compare_exchange_weak_explicit(volatile A * object, C * expected, C desired, memory_order success, memory_order failure) noexcept; bool atomic_compare_exchange_weak_explicit(A * object, C * expected, C desired, memory_order success, memory_order failure) noexcept; Parameters A ...
std::atomic_compare_exchange_weak_explicit(&head,&new_node->next, new_node,std::memory_order_release,std::memory_order_relaxed));// 循环体为空// 注意:上述循环非线程安全,至少在// 早于 4.8.3 的 GCC ( bug 60272 ),早于 2014-05-05 的 clang ( bug 18899)// 早于 2014-03-17 的 ...
参阅 atomic_exchangeatomic_exchange_explicit (C11) 将原子对象的值与一个值交换 (函数) atomic_compare_exchange_weak,atomic_compare_exchange_strong,atomic_compare_exchange_weak_explicit,atomic_compare_exchange_strong_explicit的C++ 文档
std::atomic_compare_exchange_weak_explicit( &head, &new_node->next, new_node,std::memory_order_release,std::memory_order_relaxed)) ; // 循环体为空 // 注意:上述循环非线程安全,至少在 // 早于 4.8.3 的 GCC ( bug 60272 ),早于 2014-05-05 的 clang ( bug 18899) // 早于 2014-03...
atomic_compare_exchange_weak, atomic_compare_exchange_strong, atomic_compare_exchange_weak_explicit, atomic_compare_exchange_strong_explicit atomic_fetch_add, atomic_fetch_add_explicit atomic_fetch_sub, atomic_fetch_sub_explicit atomic_fetch_or, atomic_fetch_or_explicit atomic_fetch_xor, atomic_fetch...
boolatomic_compare_exchange_weak_explicit (std::atomic<T>*obj,typenamestd::atomic<T>::value_type*expected, typenamestd::atomic<T>::value_typedesired, std::memory_ordersuccess,std::memory_orderfailure)noexcept; (5)(C++11 起) template<classT> ...