diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs index 8af4cee9095..a0fa0881975 100644 --- a/src/liballoc/arc.rs +++ b/src/liballoc/arc.rs @@ -71,8 +71,8 @@ use boxed::Box; -use core::atomic; -use core::atomic::Ordering::{Relaxed, Release, Acquire, SeqCst}; +use core::sync::atomic; +use core::sync::atomic::Ordering::{Relaxed, Release, Acquire, SeqCst}; use core::fmt; use core::cmp::Ordering; use core::mem::{align_of_val, size_of_val}; diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs index ae85e2712ce..4792f695bfb 100644 --- a/src/libcore/lib.rs +++ b/src/libcore/lib.rs @@ -142,7 +142,7 @@ pub mod convert; pub mod any; pub mod array; -pub mod atomic; +pub mod sync; pub mod cell; pub mod char; pub mod panicking; diff --git a/src/libcore/atomic.rs b/src/libcore/sync/atomic.rs similarity index 100% rename from src/libcore/atomic.rs rename to src/libcore/sync/atomic.rs diff --git a/src/libcore/sync/mod.rs b/src/libcore/sync/mod.rs new file mode 100644 index 00000000000..0080e0b5e43 --- /dev/null +++ b/src/libcore/sync/mod.rs @@ -0,0 +1,15 @@ +// Copyright 2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! Synchronization primitives + +#![stable(feature = "rust1", since = "1.0.0")] + +pub mod atomic; diff --git a/src/libstd/sync/mod.rs b/src/libstd/sync/mod.rs index 28fab5a2c9d..092d7c47d33 100644 --- a/src/libstd/sync/mod.rs +++ b/src/libstd/sync/mod.rs @@ -18,7 +18,7 @@ #![stable(feature = "rust1", since = "1.0.0")] pub use alloc::arc::{Arc, Weak}; -pub use core::atomic; +pub use core::sync::atomic; pub use self::barrier::{Barrier, BarrierWaitResult}; pub use self::condvar::{Condvar, StaticCondvar, CONDVAR_INIT};