unsafe fn atomic_swap<T>(dst: *mut T, val: T) -> T
Atomically swaps data at dst with val.
dst
val
This operation uses the AcqRel ordering. If possible, an atomic instructions is used, and a global lock otherwise.
AcqRel