1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
//! Mock implementation of `std::sync::atomic`. mod atomic; use self::atomic::Atomic; mod bool; pub use self::bool::AtomicBool; mod int; pub use self::int::{AtomicU16, AtomicU32, AtomicU64, AtomicU8, AtomicUsize}; mod ptr; pub use self::ptr::AtomicPtr; pub use std::sync::atomic::Ordering; /// Signals the processor that it is entering a busy-wait spin-loop. pub fn spin_loop_hint() { crate::thread::yield_now(); } /// An atomic fence. pub fn fence(order: Ordering) { crate::rt::fence(order); }