Function atomic_max

pub const unsafe fn atomic_max<T: Copy, const ORD: AtomicOrdering>(dst: *mut T, src: T) -> T

Maximum with the current value using a signed comparison. T must be a signed integer type.

Safety

This is equivalent to Atomic<T>::from_ptr followed by Atomic<T>::fetch_max. Refer to the documentation of Atomic<T>::from_ptr for safety requirements.

The stabilized version of this intrinsic is available on the atomic signed integer types via the fetch_max method. For example, AtomicI32::fetch_max.