std::atomic_fetch_xor, std::atomic_fetch_xor_explicit
Материал из cppreference.com
|
|
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. |
| Заголовочный файл <atomic>
|
||
| template< class Integral > Integral atomic_fetch_xor( std::atomic<Integral>* obj, Integral arg ); |
(1) | (начиная с C++11) |
| template< class Integral > Integral atomic_fetch_xor( volatile std::atomic<Integral>* obj, Integral arg ); |
(2) | (начиная с C++11) |
| template< class Integral > Integral atomic_fetch_xor_explicit( std::atomic<Integral>* obj, Integral arg, |
(3) | (начиная с C++11) |
| template< class Integral > Integral atomic_fetch_xor_explicit( volatile std::atomic<Integral>* obj, Integral arg, |
(4) | (начиная с C++11) |
Атомарно заменяет значение указано на
3-4) arg с результатом побитового XOR между старым значением obj и arg, и возвращает значение obj состоялась ранее, как по obj->fetch_and(arg)Original:
Atomically replaces the value pointed by
arg with the result of bitwise XOR between the old value of obj and arg, and returns the value obj held previously, as if by obj->fetch_and(arg)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.
Атомарно заменяет значение указано на
arg с результатом побитового XOR между старым значением obj и arg, и возвращает значение obj состоялась ранее, как по obj->fetch_and(arg, order)Original:
Atomically replaces the value pointed by
arg with the result of bitwise XOR between the old value of obj and arg, and returns the value obj held previously, as if by obj->fetch_and(arg, order)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.
Содержание |
[править] Параметры
| obj | - | Указатель на атомном объекте изменить
Original: pointer to the atomic object to modify The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| arg | - | значение побитовое XOR со значением, хранящимся в атомном объекте
Original: the value to bitwise XOR to the value stored in the atomic object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| order | - | памяти sycnhronization заказа для этой операции: все допустимые значения .
Original: the memory sycnhronization ordering for this operation: all values are permitted. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[править] Возвращаемое значение
Значение состоялась ранее атомный объект, на который указывает
objOriginal:
The value held previously by the atomic object pointed to by
objThe 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.
[править] Исключения
[править] Возможная реализация
template< class T > typename std::enable_if<std::is_integral<T>::value && !std::is_same<T, bool>::value, T>::type atomic_fetch_xor( std::atomic<T>* obj, T arg ); { return obj->fetch_xor(arg); } |
[править] Пример
| Этот раздел не завершён Причина: нет примера |
[править] См. также
| (C++11) |
атомарно выполняет побитовое XOR между аргументом и значением атомного объекта и получает значение состоявшейся ранее Original: atomically performs bitwise XOR between the argument and the value of the atomic object and obtains the value held previously The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (public функция-член std::atomic)
|
| (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 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 документация для atomic_fetch_xor, atomic_fetch_xor_explicit
| |