Method lrs::atomic::AtomicU8::compare_exchange_acquire_release

Conditionally replaces the value in the atomic integer by a new one with acquire-release semantics.

Syntax

impl AtomicU8 {
    fn compare_exchange_acquire_release(&self, old: u8, new: u8) -> u8
}

Arguments

NameDescription
old

The value the atomic integer is compared to.

new

The value to be stored in the atomic integer.

Return value

Returns the value previously stored in the atomic integer.

Remarks

If the returned value is the same as old, the value in the atomic integer has been replaced by new.