about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-08-17 13:56:55 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-08-17 14:03:32 -0700
commit0c849de1a2bad4b63b15b0155ecef8758f5211e5 (patch)
treefec7904aa8c872d9709c9cfc9ceaefe9ba4d7481
parent8cb4d8671afecdcfd2432e08c8f43673ce51f67d (diff)
downloadrust-0c849de1a2bad4b63b15b0155ecef8758f5211e5.tar.gz
rust-0c849de1a2bad4b63b15b0155ecef8758f5211e5.zip
core: Move `atomic` into a new `sync` module
This mirrors the same hierarchy in the standard library.
-rw-r--r--src/liballoc/arc.rs4
-rw-r--r--src/libcore/lib.rs2
-rw-r--r--src/libcore/sync/atomic.rs (renamed from src/libcore/atomic.rs)0
-rw-r--r--src/libcore/sync/mod.rs15
-rw-r--r--src/libstd/sync/mod.rs2
5 files changed, 19 insertions, 4 deletions
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
index 53952cdc908..53952cdc908 100644
--- a/src/libcore/atomic.rs
+++ b/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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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};