Atomic operations library
来自cppreference.com
< cpp
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
原子库提供的组件细粒度的原子操作,允许无锁的并发编程。每一个原子操作是不可分割的与任何其他的原子操作,涉及到同一个对象。原子对象是唯一的C + +对象的数据争用,也就是说,如果一个线程写入的原子,而另一个线程读取,其行为是定义良好的.
Original:
The atomic library provides components for fine-grained atomic operations allowing for lockless concurrent programming. Each atomic operation is indivisible with regards to any other atomic operation that involves the same object. Atomic objects are the only C++ objects free of data races; that is, if one thread writes to an atomic while another thread reads from it, the behavior is well-defined.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
| Defined in header
<atomic> | |
Original: Atomic types The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| (C++11) |
为布尔值,积分和指针类型的原子类模板和专业 Original: atomic class template and specializations for bool, integral, and pointer types The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (类模板) |
| (C++11) |
检查对该原子类型的操作是否是锁无关的 (函数模板) |
Original: Operations on atomic types The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| (C++11) (C++11) |
以原子的原子对象的值替换的非原子的说法 Original: atomically replaces the value of the atomic object with a non-atomic argument The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) |
| (C++11) (C++11) |
原子获得的值存储在一个原子对象 Original: atomically obtains the value stored in an atomic object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) |
| (C++11) (C++11) |
以原子的原子对象非原子参数的值替换,并返回旧值的原子 Original: atomically replaces the value of the atomic object with non-atomic argument and returns the old value of the atomic The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) |
| 原子原子对象与非原子的参数的值的比较,并执行原子交换,如果等于或原子的负载如果不是 Original: atomically compares the value of the atomic object with non-atomic argument and performs atomic exchange if equal or atomic load if not The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) | |
| (C++11) (C++11) |
添加的非原子一个原子对象的价值,并获得以前的值的原子 Original: adds a non-atomic value to an atomic object and obtains the previous value of the atomic The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) |
| (C++11) (C++11) |
减去从一个原子对象的非原子值和获得原子的先前的值 Original: subtracts a non-atomic value from an atomic object and obtains the previous value of the atomic The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) |
| (C++11) (C++11) |
取代的原子的对象与结果的逻辑AND(与),带的非原子参数和获得原子的先前的值 Original: replaces the atomic object with the result of logical AND with a non-atomic argument and obtains the previous value of the atomic The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) |
| (C++11) (C++11) |
取代的原子的对象的逻辑结果,或与非原子参数获得原子的先前的值 Original: replaces the atomic object with the result of logical OR with a non-atomic argument and obtains the previous value of the atomic The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) |
| (C++11) (C++11) |
取代的原子的对象与非原子参数的逻辑异或的结果和获得原子的先前的值 Original: replaces the atomic object with the result of logical XOR with a non-atomic argument and obtains the previous value of the atomic The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) |
Original: Flag type and operations The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| (C++11) |
无锁的布尔原子类型 Original: the lock-free boolean atomic type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (类) |
| 以原子方式设置标志true,并返回其先前的值 Original: atomically sets the flag to true and returns its previous value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
| (C++11) (C++11) |
原子设置标志false的值 Original: atomically sets the value of the flag to false The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) |
Original: Initialization The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| (C++11) |
non-atomic initialization of a default-constructed atomic object (函数模板) |
| (C++11) |
一个原子变量,常量初始化的静态存储持续时间 Original: constant initialization of an atomic variable of static storage duration The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数宏) |
| (C++11) |
initializes an std::atomic_flag to false (宏不变) |
内存同步顺序 | |
| (C++11) |
定义内存排序约束给定的原子操作 Original: defines memory ordering constraints for the given atomic operation The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (的typedef) |
| (C++11) |
从std::memory_order_consume的依赖关系树中删除指定的对象 Original: removes the specified object from the std::memory_order_consume dependency tree The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) |
| (C++11) |
通用内存的顺序独立的栅栏同步原语 Original: generic memory order-dependent fence synchronization primitive The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) |
| (C++11) |
围栏之间的线程和信号处理器,在同一个线程中执行 Original: fence between a thread and a signal handler executed in the same thread The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) |

