Function intel_tsx_hle::__hle_acquire_compare_exchange_n2
[−]
[src]
pub unsafe fn __hle_acquire_compare_exchange_n2(
ptr: *mut u16,
oldp: *mut u16,
newv: u16
) -> bool
Atomically compare-and-swap with 'HLE Acquire' memory ordering.
This compares the content of ptr
with the content of oldp
:-
* If equal, the function atomically writes newv
into ptr
and returns true
.
* If they are not equal, the function atomically writes the content of ptr
into oldp
and returns false
Since this is only for the x86 / x86_64 architecture, there is no weak variant.