core: Move atomic
into a new sync
module
This mirrors the same hierarchy in the standard library.
This commit is contained in:
parent
8cb4d8671a
commit
0c849de1a2
5 changed files with 19 additions and 4 deletions
|
@ -71,8 +71,8 @@
|
||||||
|
|
||||||
use boxed::Box;
|
use boxed::Box;
|
||||||
|
|
||||||
use core::atomic;
|
use core::sync::atomic;
|
||||||
use core::atomic::Ordering::{Relaxed, Release, Acquire, SeqCst};
|
use core::sync::atomic::Ordering::{Relaxed, Release, Acquire, SeqCst};
|
||||||
use core::fmt;
|
use core::fmt;
|
||||||
use core::cmp::Ordering;
|
use core::cmp::Ordering;
|
||||||
use core::mem::{align_of_val, size_of_val};
|
use core::mem::{align_of_val, size_of_val};
|
||||||
|
|
|
@ -142,7 +142,7 @@ pub mod convert;
|
||||||
|
|
||||||
pub mod any;
|
pub mod any;
|
||||||
pub mod array;
|
pub mod array;
|
||||||
pub mod atomic;
|
pub mod sync;
|
||||||
pub mod cell;
|
pub mod cell;
|
||||||
pub mod char;
|
pub mod char;
|
||||||
pub mod panicking;
|
pub mod panicking;
|
||||||
|
|
15
src/libcore/sync/mod.rs
Normal file
15
src/libcore/sync/mod.rs
Normal file
|
@ -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;
|
|
@ -18,7 +18,7 @@
|
||||||
#![stable(feature = "rust1", since = "1.0.0")]
|
#![stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
|
||||||
pub use alloc::arc::{Arc, Weak};
|
pub use alloc::arc::{Arc, Weak};
|
||||||
pub use core::atomic;
|
pub use core::sync::atomic;
|
||||||
|
|
||||||
pub use self::barrier::{Barrier, BarrierWaitResult};
|
pub use self::barrier::{Barrier, BarrierWaitResult};
|
||||||
pub use self::condvar::{Condvar, StaticCondvar, CONDVAR_INIT};
|
pub use self::condvar::{Condvar, StaticCondvar, CONDVAR_INIT};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue