We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e91cdd commit 18afbb6Copy full SHA for 18afbb6
crossbeam-epoch/src/atomic.rs
@@ -302,12 +302,21 @@ impl<T: ?Sized + Pointable> Atomic<T> {
302
///
303
/// let a = Atomic::<i32>::null();
304
/// ```
305
+ #[cfg(not(crossbeam_loom))]
306
pub const fn null() -> Atomic<T> {
307
Self {
308
data: AtomicPtr::new(ptr::null_mut()),
309
_marker: PhantomData,
310
}
311
312
+ /// Returns a new null atomic pointer.
313
+ #[cfg(crossbeam_loom)]
314
+ pub fn null() -> Atomic<T> {
315
+ Self {
316
+ data: AtomicPtr::new(ptr::null_mut()),
317
+ _marker: PhantomData,
318
+ }
319
320
321
/// Loads a `Shared` from the atomic pointer.
322
0 commit comments