std: Fix missing stability in sync

* The `sync` module is stable
* The `sync::mpsc` module is stable
* The `Sender::send` method is stable.
* The `Once::doit` method is now removed.
* Deprecated atomic initializers are removed.
* Renamed atomic initializers are now stable.
This commit is contained in:
Alex Crichton 2015-01-04 23:34:42 -08:00
parent 267b73d95e
commit 177f8bc55c
4 changed files with 7 additions and 18 deletions

View File

@ -146,28 +146,18 @@ pub enum Ordering {
}
/// An `AtomicBool` initialized to `false`.
#[unstable = "may be renamed, pending conventions for static initalizers"]
#[stable]
pub const ATOMIC_BOOL_INIT: AtomicBool =
AtomicBool { v: UnsafeCell { value: 0 } };
/// An `AtomicInt` initialized to `0`.
#[unstable = "may be renamed, pending conventions for static initalizers"]
#[stable]
pub const ATOMIC_INT_INIT: AtomicInt =
AtomicInt { v: UnsafeCell { value: 0 } };
/// An `AtomicUint` initialized to `0`.
#[unstable = "may be renamed, pending conventions for static initalizers"]
#[stable]
pub const ATOMIC_UINT_INIT: AtomicUint =
AtomicUint { v: UnsafeCell { value: 0, } };
/// Deprecated
#[deprecated = "renamed to ATOMIC_BOOL_INIT"]
pub const INIT_ATOMIC_BOOL: AtomicBool = ATOMIC_BOOL_INIT;
/// Deprecated
#[deprecated = "renamed to ATOMIC_INT_INIT"]
pub const INIT_ATOMIC_INT: AtomicInt = ATOMIC_INT_INIT;
/// Deprecated
#[deprecated = "renamed to ATOMIC_UINT_INIT"]
pub const INIT_ATOMIC_UINT: AtomicUint = ATOMIC_UINT_INIT;
// NB: Needs to be -1 (0b11111111...) to make fetch_nand work correctly
const UINT_TRUE: uint = -1;

View File

@ -15,7 +15,7 @@
//! and/or blocking at all, but rather provide the necessary tools to build
//! other types of concurrent primitives.
#![experimental]
#![stable]
pub use alloc::arc::{Arc, Weak};
pub use core::atomic;

View File

@ -163,6 +163,8 @@
//! }
//! ```
#![stable]
// A description of how Rust's channel implementation works
//
// Channels are supposed to be the basic building block for all other
@ -565,6 +567,7 @@ impl<T: Send> Sender<T> {
/// drop(rx);
/// assert_eq!(tx.send(1i).err().unwrap().0, 1);
/// ```
#[stable]
pub fn send(&self, t: T) -> Result<(), SendError<T>> {
let (new_inner, ret) = match *unsafe { self.inner() } {
Flavor::Oneshot(ref p) => {

View File

@ -121,10 +121,6 @@ impl Once {
unsafe { self.mutex.destroy() }
}
}
/// Deprecated
#[deprecated = "renamed to `call_once`"]
pub fn doit<F>(&'static self, f: F) where F: FnOnce() { self.call_once(f) }
}
#[cfg(test)]