Function swiss_army_knife::intel_hardware_lock_elision::__hle_release_compare_exchange_n4 [−][src]
pub unsafe fn __hle_release_compare_exchange_n4(
ptr: *mut u32,
oldp: *mut u32,
newv: u32
) -> bool
Expand description
Atomically compare-and-swap with ‘HLE Release’ memory ordering.
This compares the content of ptr
with the content of oldp
:-
- If equal, the function atomically writes
newv
intoptr
and returnstrue
. - If they are not equal, the function atomically writes the content of
ptr
intooldp
and returnsfalse
Since this is only for the x86 / x86_64 architecture, there is no weak variant.