• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //! Implementation of an atomic u64 cell. On 64 bit platforms, this is a
2 //! re-export of `AtomicU64`. On 32 bit platforms, this is implemented using a
3 //! `Mutex`.
4 
5 // `AtomicU64` can only be used on targets with `target_has_atomic` is 64 or greater.
6 // Once `cfg_target_has_atomic` feature is stable, we can replace it with
7 // `#[cfg(target_has_atomic = "64")]`.
8 // Refs: https://github.com/rust-lang/rust/tree/master/src/librustc_target
9 cfg_has_atomic_u64! {
10     #[path = "atomic_u64_native.rs"]
11     mod imp;
12 }
13 
14 cfg_not_has_atomic_u64! {
15     #[path = "atomic_u64_as_mutex.rs"]
16     mod imp;
17 }
18 
19 pub(crate) use imp::{AtomicU64, StaticAtomicU64};
20