atomic_exchange 함수
Uses Value to replace the stored value of Atom.
template <class _Ty>
inline Ty atomic_exchange(
volatile atomic<Ty> *_Atom,
TyValue
) _NOEXCEPT;
template <class Ty>
inline _Ty atomic_exchange(
atomic<Ty> *Atom,
TyValue
) _NOEXCEPT;
매개 변수
Atom
Ty 형식의 값을 저장하는 atomic 개체에 대한 포인터입니다.Value
Ty 형식의 값입니다.
반환 값
교환하기 전에 Atom 의 저장된 값입니다.
설명
The atomic_exchange function performs a read-modify-write operation to exchange the value that is stored in Atom with Value, using the memory_order_seq_cst memory_order.
요구 사항
헤더: atomic
네임스페이스: std