Skip to content

Commit 0c849de

Browse files
committed
core: Move atomic into a new sync module
This mirrors the same hierarchy in the standard library.
1 parent 8cb4d86 commit 0c849de

File tree

5 files changed

+19
-4
lines changed

5 files changed

+19
-4
lines changed

src/liballoc/arc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@
7171
7272
use boxed::Box;
7373

74-
use core::atomic;
75-
use core::atomic::Ordering::{Relaxed, Release, Acquire, SeqCst};
74+
use core::sync::atomic;
75+
use core::sync::atomic::Ordering::{Relaxed, Release, Acquire, SeqCst};
7676
use core::fmt;
7777
use core::cmp::Ordering;
7878
use core::mem::{align_of_val, size_of_val};

src/libcore/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ pub mod convert;
142142

143143
pub mod any;
144144
pub mod array;
145-
pub mod atomic;
145+
pub mod sync;
146146
pub mod cell;
147147
pub mod char;
148148
pub mod panicking;
File renamed without changes.

src/libcore/sync/mod.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
//! Synchronization primitives
12+
13+
#![stable(feature = "rust1", since = "1.0.0")]
14+
15+
pub mod atomic;

src/libstd/sync/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#![stable(feature = "rust1", since = "1.0.0")]
1919

2020
pub use alloc::arc::{Arc, Weak};
21-
pub use core::atomic;
21+
pub use core::sync::atomic;
2222

2323
pub use self::barrier::{Barrier, BarrierWaitResult};
2424
pub use self::condvar::{Condvar, StaticCondvar, CONDVAR_INIT};

0 commit comments

Comments
 (0)