std::atomic_fetch_xor, std::atomic_fetch_xor_explicit
De 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. |
| Defined in header <atomic>
|
||
| template< class Integral > Integral atomic_fetch_xor( std::atomic<Integral>* obj, Integral arg ); |
(1) | (ya que C + +11) |
| template< class Integral > Integral atomic_fetch_xor( volatile std::atomic<Integral>* obj, Integral arg ); |
(2) | (ya que C + +11) |
| template< class Integral > Integral atomic_fetch_xor_explicit( std::atomic<Integral>* obj, Integral arg, |
(3) | (ya que C + +11) |
| template< class Integral > Integral atomic_fetch_xor_explicit( volatile std::atomic<Integral>* obj, Integral arg, |
(4) | (ya que C + +11) |
Atómicamente reemplaza el valor apuntado por
3-4) arg con el resultado de XOR bit a bit entre el valor antiguo de obj y arg, y devuelve el valor contenido obj anteriormente, como por 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.
Atómicamente reemplaza el valor apuntado por
arg con el resultado de XOR bit a bit entre el valor antiguo de obj y arg, y devuelve el valor contenido obj anteriormente, como por 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.
Contenido |
[editar] Parámetros
| obj | - | puntero al objeto atómico modificar
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 | - | el valor a XOR bit a bit con el valor almacenado en el objeto atómico
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 la memoria de pedidos para esta operación: todos los valores están permitidos .
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. |
[editar] Valor de retorno
El valor retenido previamente por el objeto al que apunta atómica
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.
[editar] Excepciones
[editar] Posible implementación
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); } |
[editar] Ejemplo
| This section is incomplete Reason: no example |
[editar] Ver también
| (C++11) |
atómicamente realiza bit a bit XOR entre el argumento y el valor del objeto atómico y obtiene el valor que tenía antes 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. (miembro público of std::atomic función)
|
| (C++11) (C++11) |
reemplaza el objeto atómico con el resultado de la operación lógica OR con un argumento no atómica y obtiene el valor anterior de la atómica 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. (función de plantilla) |
| (C++11) (C++11) |
reemplaza el objeto atómico con el resultado de la operación lógica AND con un argumento no atómica y obtiene el valor anterior de la atómica 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. (función de plantilla) |
| C documentation for atomic_fetch_xor, atomic_fetch_xor_explicit
| |