std::atomic::exchange
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. |
<metanoindex/>
<tbody> </tbody> T exchange( T desired, memory_order = std::memory_order_seq_cst ); |
(depuis C++11) | |
T exchange( T desired, memory_order = std::memory_order_seq_cst ) volatile; |
(depuis C++11) | |
Remplace la valeur sous-jacente atomique avec
desired. L'opération est de lecture-modification-écriture. La mémoire est affectée en fonction de la valeur de memory_order .Original:
Atomically replaces the underlying value with
desired. The operation is read-modify-write operation. Memory is affected according to the value of memory_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.
Paramètres
| desired | - | valeur à assigner
Original: value to assign The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| memory_order | - | contraintes d'ordre pour faire respecter la mémoire
Original: memory order constraints to enforce The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Retourne la valeur
La valeur de la variable atomique avant l'appel .
Original:
The value of the atomic variable before the call.
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.
Exceptions
Voir aussi
(C++11) (C++11) |
remplace atomiquement la valeur de l'objet atomique avec des non-atomique argument et retourne l'ancienne valeur de l'atomique 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. (fonction générique) |