diff --git a/crossbeam-epoch/src/atomic.rs b/crossbeam-epoch/src/atomic.rs index f6e52ac8c..0dc61021a 100644 --- a/crossbeam-epoch/src/atomic.rs +++ b/crossbeam-epoch/src/atomic.rs @@ -343,12 +343,21 @@ impl Atomic { /// /// let a = Atomic::::null(); /// ``` + #[cfg(not(crossbeam_loom))] pub const fn null() -> Atomic { Self { data: AtomicUsize::new(0), _marker: PhantomData, } } + /// Returns a new null atomic pointer. + #[cfg(crossbeam_loom)] + pub fn null() -> Atomic { + Self { + data: AtomicUsize::new(0), + _marker: PhantomData, + } + } /// Loads a `Shared` from the atomic pointer. ///