pub const unsafe fn atomic_load<T: Copy, const ORD: AtomicOrdering, const VOLATILE: bool>(
src: *const T,
) -> T🔬This is a nightly-only experimental API. (
core_intrinsics)Expand description
Loads the current value of the pointer.
T must be an integer or pointer type.
§Safety
-
If
VOLATILEistrue, this is equivalent toAtomic<T>::load_volatile. Refer to the documentation of that method for safety requirements. -
If
VOLATILEisfalse, this is equivalent toAtomic<T>::from_ptrfollowed byAtomic<T>::load. Refer to the documentation ofAtomic<T>::from_ptrfor safety requirements.
The stabilized version of this intrinsic is available on the
atomic types via the load method. For example, AtomicBool::load.