std::atomic_load, std::atomic_load_explicit
来自cppreference.com
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
在头文件 <atomic> 中定义
|
||
template< class T > T atomic_load( std::atomic<T>* obj ); |
(1) | (C++11 起) |
template< class T > T atomic_load( volatile std::atomic<T>* obj ); |
(2) | (C++11 起) |
template< class T > T atomic_load_explicit( std::atomic<T>* obj, |
(3) | (C++11 起) |
template< class T > T atomic_load_explicit( volatile std::atomic<T>* obj, |
(4) | (C++11 起) |
原子获得的
3-4) obj
指向的值,如果通过obj->load()原文:
Atomically obtains the value pointed to by
obj
as if by obj->load()原子获得的
obj
指向的值,如果通过obj->load(order)原文:
Atomically obtains the value pointed to by
obj
as if by obj->load(order)目录 |
[编辑] 参数
obj | - | 指针的原子对象修改
原文: pointer to the atomic object to modify |
order | - | 的的内存sycnhronization订购此操作:只std::memory_order_relaxed,std::memory_order_consume,std::memory_order_acquire和std::memory_order_seq_cst是允许的.....
原文: the memory sycnhronization ordering for this operation: only std::memory_order_relaxed, std::memory_order_consume, std::memory_order_acquire and std::memory_order_seq_cst are permitted. |
[编辑] 返回值
举行的原子对象的值,指出
obj
原文:
The value that is held by the atomic object pointed to by
obj
[编辑] 例外
[编辑] 另请参阅
(C++11) |
原子获得的值的原子对象 原文: atomically obtains the value of the atomic object (公共成员函数of std::atomic )
|
(C++11) (C++11) |
以原子的原子对象的值替换的非原子的说法 原文: atomically replaces the value of the atomic object with a non-atomic argument (函数模板) |
(C++11) |
定义内存排序约束给定的原子操作 原文: defines memory ordering constraints for the given atomic operation (typedef) |
专业的std :: shared_ptr的原子操作 原文: specializes atomic operations for std::shared_ptr (函数模板) | |
C documentation for atomic_load, atomic_load_explicit
|