auto merge of #12026 : alexcrichton/rust/snapshots, r=cmr
This commit is contained in:
commit
ef53b7a97c
@ -34,11 +34,6 @@ Rust extras are part of the standard Rust distribution.
|
||||
#[deny(non_camel_case_types)];
|
||||
#[deny(missing_doc)];
|
||||
|
||||
#[cfg(stage0)]
|
||||
macro_rules! if_ok (
|
||||
($e:expr) => (match $e { Ok(e) => e, Err(e) => return Err(e) })
|
||||
)
|
||||
|
||||
// Utility modules
|
||||
|
||||
pub mod c_vec;
|
||||
|
@ -54,11 +54,6 @@ use syntax::diagnostic::Emitter;
|
||||
use syntax::diagnostic;
|
||||
use syntax::parse;
|
||||
|
||||
#[cfg(stage0)]
|
||||
macro_rules! if_ok (
|
||||
($e:expr) => (match $e { Ok(e) => e, Err(e) => return Err(e) })
|
||||
)
|
||||
|
||||
pub mod middle {
|
||||
pub mod trans;
|
||||
pub mod ty;
|
||||
|
@ -493,11 +493,6 @@ use util;
|
||||
use vec::ImmutableVector;
|
||||
use vec;
|
||||
|
||||
// NOTE this is just because the `prelude::*` import above includes
|
||||
// default::Default, so the reexport doesn't work.
|
||||
#[cfg(stage0)]
|
||||
pub use Default = fmt::Show; // export required for `format!()` etc.
|
||||
|
||||
pub mod parse;
|
||||
pub mod rt;
|
||||
|
||||
|
@ -446,15 +446,4 @@ impl<V:TyVisitor + MovePtr> TyVisitor for MovePtrAdaptor<V> {
|
||||
if ! self.inner.visit_type() { return false; }
|
||||
true
|
||||
}
|
||||
|
||||
// NOTE remove after next snapshot
|
||||
#[cfg(stage0)]
|
||||
fn visit_closure_ptr(&mut self, ck: uint) -> bool {
|
||||
self.align_to::<proc()>();
|
||||
if ! self.inner.visit_closure_ptr(ck) {
|
||||
return false
|
||||
}
|
||||
self.bump_past::<proc()>();
|
||||
true
|
||||
}
|
||||
}
|
||||
|
@ -602,10 +602,6 @@ impl<'a> TyVisitor for ReprVisitor<'a> {
|
||||
fn visit_param(&mut self, _i: uint) -> bool { true }
|
||||
fn visit_self(&mut self) -> bool { true }
|
||||
fn visit_type(&mut self) -> bool { true }
|
||||
|
||||
// NOTE remove after next snapshot
|
||||
#[cfg(stage0)]
|
||||
fn visit_closure_ptr(&mut self, _ck: uint) -> bool { true }
|
||||
}
|
||||
|
||||
pub fn write_repr<T>(writer: &mut io::Writer, object: &T) -> io::IoResult<()> {
|
||||
|
@ -63,7 +63,6 @@ pub struct AtomicUint {
|
||||
* An unsigned atomic integer type that is forced to be 64-bits. This does not
|
||||
* support all operations.
|
||||
*/
|
||||
#[cfg(not(stage0))]
|
||||
pub struct AtomicU64 {
|
||||
priv v: u64,
|
||||
priv nopod: marker::NoPod
|
||||
@ -72,30 +71,18 @@ pub struct AtomicU64 {
|
||||
/**
|
||||
* An unsafe atomic pointer. Only supports basic atomic operations
|
||||
*/
|
||||
#[cfg(not(stage0))]
|
||||
pub struct AtomicPtr<T> {
|
||||
priv p: uint,
|
||||
priv nopod: marker::NoPod
|
||||
}
|
||||
#[cfg(stage0)]
|
||||
pub struct AtomicPtr<T> {
|
||||
priv p: *mut T,
|
||||
priv nopod: marker::NoPod
|
||||
}
|
||||
|
||||
/**
|
||||
* An owned atomic pointer. Ensures that only a single reference to the data is held at any time.
|
||||
*/
|
||||
#[unsafe_no_drop_flag]
|
||||
#[cfg(not(stage0))]
|
||||
pub struct AtomicOption<T> {
|
||||
priv p: uint,
|
||||
}
|
||||
#[unsafe_no_drop_flag]
|
||||
#[cfg(stage0)]
|
||||
pub struct AtomicOption<T> {
|
||||
priv p: *mut u8
|
||||
}
|
||||
|
||||
pub enum Ordering {
|
||||
Relaxed,
|
||||
@ -109,7 +96,6 @@ pub static INIT_ATOMIC_FLAG : AtomicFlag = AtomicFlag { v: 0, nopod: marker::NoP
|
||||
pub static INIT_ATOMIC_BOOL : AtomicBool = AtomicBool { v: 0, nopod: marker::NoPod };
|
||||
pub static INIT_ATOMIC_INT : AtomicInt = AtomicInt { v: 0, nopod: marker::NoPod };
|
||||
pub static INIT_ATOMIC_UINT : AtomicUint = AtomicUint { v: 0, nopod: marker::NoPod };
|
||||
#[cfg(not(stage0))]
|
||||
pub static INIT_ATOMIC_U64 : AtomicU64 = AtomicU64 { v: 0, nopod: marker::NoPod };
|
||||
|
||||
impl AtomicFlag {
|
||||
@ -239,7 +225,6 @@ impl AtomicInt {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(stage0))]
|
||||
impl AtomicU64 {
|
||||
pub fn new(v: u64) -> AtomicU64 {
|
||||
AtomicU64 { v:v, nopod: marker::NoPod }
|
||||
@ -315,17 +300,11 @@ impl AtomicUint {
|
||||
}
|
||||
|
||||
impl<T> AtomicPtr<T> {
|
||||
#[cfg(stage0)]
|
||||
pub fn new(p: *mut T) -> AtomicPtr<T> {
|
||||
AtomicPtr { p: p, nopod: marker::NoPod }
|
||||
}
|
||||
#[cfg(not(stage0))]
|
||||
pub fn new(p: *mut T) -> AtomicPtr<T> {
|
||||
AtomicPtr { p: p as uint, nopod: marker::NoPod }
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[cfg(not(stage0))]
|
||||
pub fn load(&self, order: Ordering) -> *mut T {
|
||||
unsafe {
|
||||
atomic_load(&self.p, order) as *mut T
|
||||
@ -333,49 +312,22 @@ impl<T> AtomicPtr<T> {
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[cfg(not(stage0))]
|
||||
pub fn store(&mut self, ptr: *mut T, order: Ordering) {
|
||||
unsafe { atomic_store(&mut self.p, ptr as uint, order); }
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[cfg(not(stage0))]
|
||||
pub fn swap(&mut self, ptr: *mut T, order: Ordering) -> *mut T {
|
||||
unsafe { atomic_swap(&mut self.p, ptr as uint, order) as *mut T }
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[cfg(not(stage0))]
|
||||
pub fn compare_and_swap(&mut self, old: *mut T, new: *mut T, order: Ordering) -> *mut T {
|
||||
unsafe {
|
||||
atomic_compare_and_swap(&mut self.p, old as uint,
|
||||
new as uint, order) as *mut T
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[cfg(stage0)]
|
||||
pub fn load(&self, order: Ordering) -> *mut T {
|
||||
unsafe { atomic_load(&self.p, order) }
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[cfg(stage0)]
|
||||
pub fn store(&mut self, ptr: *mut T, order: Ordering) {
|
||||
unsafe { atomic_store(&mut self.p, ptr, order); }
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[cfg(stage0)]
|
||||
pub fn swap(&mut self, ptr: *mut T, order: Ordering) -> *mut T {
|
||||
unsafe { atomic_swap(&mut self.p, ptr, order) }
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[cfg(stage0)]
|
||||
pub fn compare_and_swap(&mut self, old: *mut T, new: *mut T, order: Ordering) -> *mut T {
|
||||
unsafe { atomic_compare_and_swap(&mut self.p, old, new, order) }
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> AtomicOption<T> {
|
||||
@ -383,9 +335,6 @@ impl<T> AtomicOption<T> {
|
||||
unsafe { AtomicOption { p: cast::transmute(p) } }
|
||||
}
|
||||
|
||||
#[cfg(stage0)]
|
||||
pub fn empty() -> AtomicOption<T> { AtomicOption { p: 0 as *mut u8 } }
|
||||
#[cfg(not(stage0))]
|
||||
pub fn empty() -> AtomicOption<T> { AtomicOption { p: 0 } }
|
||||
|
||||
#[inline]
|
||||
@ -439,18 +388,6 @@ impl<T> Drop for AtomicOption<T> {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(stage0)]
|
||||
#[inline]
|
||||
pub unsafe fn atomic_store<T>(dst: &mut T, val: T, order:Ordering) {
|
||||
let dst = cast::transmute(dst);
|
||||
let val = cast::transmute(val);
|
||||
cast::transmute(match order {
|
||||
Release => intrinsics::atomic_store_rel(dst, val),
|
||||
Relaxed => intrinsics::atomic_store_relaxed(dst, val),
|
||||
_ => intrinsics::atomic_store(dst, val)
|
||||
})
|
||||
}
|
||||
#[cfg(not(stage0))]
|
||||
#[inline]
|
||||
pub unsafe fn atomic_store<T>(dst: &mut T, val: T, order:Ordering) {
|
||||
match order {
|
||||
@ -460,17 +397,6 @@ pub unsafe fn atomic_store<T>(dst: &mut T, val: T, order:Ordering) {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(stage0)]
|
||||
#[inline]
|
||||
pub unsafe fn atomic_load<T>(dst: &T, order:Ordering) -> T {
|
||||
let dst = cast::transmute(dst);
|
||||
cast::transmute(match order {
|
||||
Acquire => intrinsics::atomic_load_acq(dst),
|
||||
Relaxed => intrinsics::atomic_load_relaxed(dst),
|
||||
_ => intrinsics::atomic_load(dst)
|
||||
})
|
||||
}
|
||||
#[cfg(not(stage0))]
|
||||
#[inline]
|
||||
pub unsafe fn atomic_load<T>(dst: &T, order:Ordering) -> T {
|
||||
match order {
|
||||
@ -480,20 +406,6 @@ pub unsafe fn atomic_load<T>(dst: &T, order:Ordering) -> T {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(stage0)]
|
||||
#[inline]
|
||||
pub unsafe fn atomic_swap<T>(dst: &mut T, val: T, order: Ordering) -> T {
|
||||
let dst = cast::transmute(dst);
|
||||
let val = cast::transmute(val);
|
||||
cast::transmute(match order {
|
||||
Acquire => intrinsics::atomic_xchg_acq(dst, val),
|
||||
Release => intrinsics::atomic_xchg_rel(dst, val),
|
||||
AcqRel => intrinsics::atomic_xchg_acqrel(dst, val),
|
||||
Relaxed => intrinsics::atomic_xchg_relaxed(dst, val),
|
||||
_ => intrinsics::atomic_xchg(dst, val)
|
||||
})
|
||||
}
|
||||
#[cfg(not(stage0))]
|
||||
#[inline]
|
||||
pub unsafe fn atomic_swap<T>(dst: &mut T, val: T, order: Ordering) -> T {
|
||||
match order {
|
||||
@ -506,21 +418,6 @@ pub unsafe fn atomic_swap<T>(dst: &mut T, val: T, order: Ordering) -> T {
|
||||
}
|
||||
|
||||
/// Returns the old value (like __sync_fetch_and_add).
|
||||
#[cfg(stage0)]
|
||||
#[inline]
|
||||
pub unsafe fn atomic_add<T>(dst: &mut T, val: T, order: Ordering) -> T {
|
||||
let dst = cast::transmute(dst);
|
||||
let val = cast::transmute(val);
|
||||
cast::transmute(match order {
|
||||
Acquire => intrinsics::atomic_xadd_acq(dst, val),
|
||||
Release => intrinsics::atomic_xadd_rel(dst, val),
|
||||
AcqRel => intrinsics::atomic_xadd_acqrel(dst, val),
|
||||
Relaxed => intrinsics::atomic_xadd_relaxed(dst, val),
|
||||
_ => intrinsics::atomic_xadd(dst, val)
|
||||
})
|
||||
}
|
||||
/// Returns the old value (like __sync_fetch_and_add).
|
||||
#[cfg(not(stage0))]
|
||||
#[inline]
|
||||
pub unsafe fn atomic_add<T>(dst: &mut T, val: T, order: Ordering) -> T {
|
||||
match order {
|
||||
@ -533,21 +430,6 @@ pub unsafe fn atomic_add<T>(dst: &mut T, val: T, order: Ordering) -> T {
|
||||
}
|
||||
|
||||
/// Returns the old value (like __sync_fetch_and_sub).
|
||||
#[cfg(stage0)]
|
||||
#[inline]
|
||||
pub unsafe fn atomic_sub<T>(dst: &mut T, val: T, order: Ordering) -> T {
|
||||
let dst = cast::transmute(dst);
|
||||
let val = cast::transmute(val);
|
||||
cast::transmute(match order {
|
||||
Acquire => intrinsics::atomic_xsub_acq(dst, val),
|
||||
Release => intrinsics::atomic_xsub_rel(dst, val),
|
||||
AcqRel => intrinsics::atomic_xsub_acqrel(dst, val),
|
||||
Relaxed => intrinsics::atomic_xsub_relaxed(dst, val),
|
||||
_ => intrinsics::atomic_xsub(dst, val)
|
||||
})
|
||||
}
|
||||
/// Returns the old value (like __sync_fetch_and_sub).
|
||||
#[cfg(not(stage0))]
|
||||
#[inline]
|
||||
pub unsafe fn atomic_sub<T>(dst: &mut T, val: T, order: Ordering) -> T {
|
||||
match order {
|
||||
@ -559,21 +441,6 @@ pub unsafe fn atomic_sub<T>(dst: &mut T, val: T, order: Ordering) -> T {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(stage0)]
|
||||
#[inline]
|
||||
pub unsafe fn atomic_compare_and_swap<T>(dst:&mut T, old:T, new:T, order: Ordering) -> T {
|
||||
let dst = cast::transmute(dst);
|
||||
let new = cast::transmute(new);
|
||||
let old = cast::transmute(old);
|
||||
cast::transmute(match order {
|
||||
Acquire => intrinsics::atomic_cxchg_acq(dst, old, new),
|
||||
Release => intrinsics::atomic_cxchg_rel(dst, old, new),
|
||||
AcqRel => intrinsics::atomic_cxchg_acqrel(dst, old, new),
|
||||
Relaxed => intrinsics::atomic_cxchg_relaxed(dst, old, new),
|
||||
_ => intrinsics::atomic_cxchg(dst, old, new),
|
||||
})
|
||||
}
|
||||
#[cfg(not(stage0))]
|
||||
#[inline]
|
||||
pub unsafe fn atomic_compare_and_swap<T>(dst:&mut T, old:T, new:T, order: Ordering) -> T {
|
||||
match order {
|
||||
@ -585,20 +452,6 @@ pub unsafe fn atomic_compare_and_swap<T>(dst:&mut T, old:T, new:T, order: Orderi
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(stage0)]
|
||||
#[inline]
|
||||
pub unsafe fn atomic_and<T>(dst: &mut T, val: T, order: Ordering) -> T {
|
||||
let dst = cast::transmute(dst);
|
||||
let val = cast::transmute(val);
|
||||
cast::transmute(match order {
|
||||
Acquire => intrinsics::atomic_and_acq(dst, val),
|
||||
Release => intrinsics::atomic_and_rel(dst, val),
|
||||
AcqRel => intrinsics::atomic_and_acqrel(dst, val),
|
||||
Relaxed => intrinsics::atomic_and_relaxed(dst, val),
|
||||
_ => intrinsics::atomic_and(dst, val)
|
||||
})
|
||||
}
|
||||
#[cfg(not(stage0))]
|
||||
#[inline]
|
||||
pub unsafe fn atomic_and<T>(dst: &mut T, val: T, order: Ordering) -> T {
|
||||
match order {
|
||||
@ -610,20 +463,6 @@ pub unsafe fn atomic_and<T>(dst: &mut T, val: T, order: Ordering) -> T {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(stage0)]
|
||||
#[inline]
|
||||
pub unsafe fn atomic_nand<T>(dst: &mut T, val: T, order: Ordering) -> T {
|
||||
let dst = cast::transmute(dst);
|
||||
let val = cast::transmute(val);
|
||||
cast::transmute(match order {
|
||||
Acquire => intrinsics::atomic_nand_acq(dst, val),
|
||||
Release => intrinsics::atomic_nand_rel(dst, val),
|
||||
AcqRel => intrinsics::atomic_nand_acqrel(dst, val),
|
||||
Relaxed => intrinsics::atomic_nand_relaxed(dst, val),
|
||||
_ => intrinsics::atomic_nand(dst, val)
|
||||
})
|
||||
}
|
||||
#[cfg(not(stage0))]
|
||||
#[inline]
|
||||
pub unsafe fn atomic_nand<T>(dst: &mut T, val: T, order: Ordering) -> T {
|
||||
match order {
|
||||
@ -636,20 +475,6 @@ pub unsafe fn atomic_nand<T>(dst: &mut T, val: T, order: Ordering) -> T {
|
||||
}
|
||||
|
||||
|
||||
#[cfg(stage0)]
|
||||
#[inline]
|
||||
pub unsafe fn atomic_or<T>(dst: &mut T, val: T, order: Ordering) -> T {
|
||||
let dst = cast::transmute(dst);
|
||||
let val = cast::transmute(val);
|
||||
cast::transmute(match order {
|
||||
Acquire => intrinsics::atomic_or_acq(dst, val),
|
||||
Release => intrinsics::atomic_or_rel(dst, val),
|
||||
AcqRel => intrinsics::atomic_or_acqrel(dst, val),
|
||||
Relaxed => intrinsics::atomic_or_relaxed(dst, val),
|
||||
_ => intrinsics::atomic_or(dst, val)
|
||||
})
|
||||
}
|
||||
#[cfg(not(stage0))]
|
||||
#[inline]
|
||||
pub unsafe fn atomic_or<T>(dst: &mut T, val: T, order: Ordering) -> T {
|
||||
match order {
|
||||
@ -662,20 +487,6 @@ pub unsafe fn atomic_or<T>(dst: &mut T, val: T, order: Ordering) -> T {
|
||||
}
|
||||
|
||||
|
||||
#[cfg(stage0)]
|
||||
#[inline]
|
||||
pub unsafe fn atomic_xor<T>(dst: &mut T, val: T, order: Ordering) -> T {
|
||||
let dst = cast::transmute(dst);
|
||||
let val = cast::transmute(val);
|
||||
cast::transmute(match order {
|
||||
Acquire => intrinsics::atomic_xor_acq(dst, val),
|
||||
Release => intrinsics::atomic_xor_rel(dst, val),
|
||||
AcqRel => intrinsics::atomic_xor_acqrel(dst, val),
|
||||
Relaxed => intrinsics::atomic_xor_relaxed(dst, val),
|
||||
_ => intrinsics::atomic_xor(dst, val)
|
||||
})
|
||||
}
|
||||
#[cfg(not(stage0))]
|
||||
#[inline]
|
||||
pub unsafe fn atomic_xor<T>(dst: &mut T, val: T, order: Ordering) -> T {
|
||||
match order {
|
||||
@ -796,7 +607,6 @@ mod test {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(stage0))]
|
||||
fn different_sizes() {
|
||||
unsafe {
|
||||
let mut slot = 0u16;
|
||||
|
@ -56,11 +56,6 @@ pub struct TyDesc {
|
||||
// alignof(T)
|
||||
align: uint,
|
||||
|
||||
// Called on a copy of a value of type `T` *after* memcpy
|
||||
// NOTE remove after next snapshot
|
||||
#[cfg(stage0)]
|
||||
take_glue: GlueFn,
|
||||
|
||||
// Called when a value of type `T` is no longer needed
|
||||
drop_glue: GlueFn,
|
||||
|
||||
@ -166,121 +161,8 @@ pub trait TyVisitor {
|
||||
fn visit_param(&mut self, i: uint) -> bool;
|
||||
fn visit_self(&mut self) -> bool;
|
||||
fn visit_type(&mut self) -> bool;
|
||||
|
||||
// NOTE remove after next snapshot
|
||||
#[cfg(stage0)]
|
||||
fn visit_closure_ptr(&mut self, ck: uint) -> bool;
|
||||
}
|
||||
|
||||
#[cfg(stage0)]
|
||||
extern "rust-intrinsic" {
|
||||
/// Atomic compare and exchange, sequentially consistent.
|
||||
pub fn atomic_cxchg(dst: &mut int, old: int, src: int) -> int;
|
||||
/// Atomic compare and exchange, acquire ordering.
|
||||
pub fn atomic_cxchg_acq(dst: &mut int, old: int, src: int) -> int;
|
||||
/// Atomic compare and exchange, release ordering.
|
||||
pub fn atomic_cxchg_rel(dst: &mut int, old: int, src: int) -> int;
|
||||
|
||||
pub fn atomic_cxchg_acqrel(dst: &mut int, old: int, src: int) -> int;
|
||||
pub fn atomic_cxchg_relaxed(dst: &mut int, old: int, src: int) -> int;
|
||||
|
||||
|
||||
/// Atomic load, sequentially consistent.
|
||||
pub fn atomic_load(src: &int) -> int;
|
||||
/// Atomic load, acquire ordering.
|
||||
pub fn atomic_load_acq(src: &int) -> int;
|
||||
|
||||
pub fn atomic_load_relaxed(src: &int) -> int;
|
||||
|
||||
/// Atomic store, sequentially consistent.
|
||||
pub fn atomic_store(dst: &mut int, val: int);
|
||||
/// Atomic store, release ordering.
|
||||
pub fn atomic_store_rel(dst: &mut int, val: int);
|
||||
|
||||
pub fn atomic_store_relaxed(dst: &mut int, val: int);
|
||||
|
||||
/// Atomic exchange, sequentially consistent.
|
||||
pub fn atomic_xchg(dst: &mut int, src: int) -> int;
|
||||
/// Atomic exchange, acquire ordering.
|
||||
pub fn atomic_xchg_acq(dst: &mut int, src: int) -> int;
|
||||
/// Atomic exchange, release ordering.
|
||||
pub fn atomic_xchg_rel(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_xchg_acqrel(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_xchg_relaxed(dst: &mut int, src: int) -> int;
|
||||
|
||||
/// Atomic addition, sequentially consistent.
|
||||
pub fn atomic_xadd(dst: &mut int, src: int) -> int;
|
||||
/// Atomic addition, acquire ordering.
|
||||
pub fn atomic_xadd_acq(dst: &mut int, src: int) -> int;
|
||||
/// Atomic addition, release ordering.
|
||||
pub fn atomic_xadd_rel(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_xadd_acqrel(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_xadd_relaxed(dst: &mut int, src: int) -> int;
|
||||
|
||||
/// Atomic subtraction, sequentially consistent.
|
||||
pub fn atomic_xsub(dst: &mut int, src: int) -> int;
|
||||
/// Atomic subtraction, acquire ordering.
|
||||
pub fn atomic_xsub_acq(dst: &mut int, src: int) -> int;
|
||||
/// Atomic subtraction, release ordering.
|
||||
pub fn atomic_xsub_rel(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_xsub_acqrel(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_xsub_relaxed(dst: &mut int, src: int) -> int;
|
||||
|
||||
pub fn atomic_and(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_and_acq(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_and_rel(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_and_acqrel(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_and_relaxed(dst: &mut int, src: int) -> int;
|
||||
|
||||
pub fn atomic_nand(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_nand_acq(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_nand_rel(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_nand_acqrel(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_nand_relaxed(dst: &mut int, src: int) -> int;
|
||||
|
||||
pub fn atomic_or(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_or_acq(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_or_rel(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_or_acqrel(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_or_relaxed(dst: &mut int, src: int) -> int;
|
||||
|
||||
pub fn atomic_xor(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_xor_acq(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_xor_rel(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_xor_acqrel(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_xor_relaxed(dst: &mut int, src: int) -> int;
|
||||
|
||||
pub fn atomic_max(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_max_acq(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_max_rel(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_max_acqrel(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_max_relaxed(dst: &mut int, src: int) -> int;
|
||||
|
||||
pub fn atomic_min(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_min_acq(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_min_rel(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_min_acqrel(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_min_relaxed(dst: &mut int, src: int) -> int;
|
||||
|
||||
pub fn atomic_umin(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_umin_acq(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_umin_rel(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_umin_acqrel(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_umin_relaxed(dst: &mut int, src: int) -> int;
|
||||
|
||||
pub fn atomic_umax(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_umax_acq(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_umax_rel(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_umax_acqrel(dst: &mut int, src: int) -> int;
|
||||
pub fn atomic_umax_relaxed(dst: &mut int, src: int) -> int;
|
||||
|
||||
pub fn atomic_fence();
|
||||
pub fn atomic_fence_acq();
|
||||
pub fn atomic_fence_rel();
|
||||
pub fn atomic_fence_acqrel();
|
||||
}
|
||||
|
||||
#[cfg(not(stage0))]
|
||||
extern "rust-intrinsic" {
|
||||
pub fn atomic_cxchg<T>(dst: &mut T, old: T, src: T) -> T;
|
||||
pub fn atomic_cxchg_acq<T>(dst: &mut T, old: T, src: T) -> T;
|
||||
@ -366,9 +248,7 @@ extern "rust-intrinsic" {
|
||||
pub fn atomic_fence_acq();
|
||||
pub fn atomic_fence_rel();
|
||||
pub fn atomic_fence_acqrel();
|
||||
}
|
||||
|
||||
extern "rust-intrinsic" {
|
||||
/// Abort the execution of the process.
|
||||
pub fn abort() -> !;
|
||||
|
||||
|
@ -33,11 +33,6 @@ This API is completely unstable and subject to change.
|
||||
extern mod extra;
|
||||
extern mod term;
|
||||
|
||||
#[cfg(stage0)]
|
||||
macro_rules! if_ok (
|
||||
($e:expr) => (match $e { Ok(e) => e, Err(e) => return Err(e) })
|
||||
)
|
||||
|
||||
pub mod util {
|
||||
pub mod interner;
|
||||
#[cfg(test)]
|
||||
|
@ -1,3 +1,11 @@
|
||||
S 2014-02-03 346d378
|
||||
freebsd-x86_64 d369c1a83a2be6eb42bd0e550a1adc38ffed0804
|
||||
linux-i386 a6d4ab441f5b285d7aecbb940fa733526b413f34
|
||||
linux-x86_64 83c3e5e74e8c359a557bb281ced7b4d9e53c91dd
|
||||
macos-i386 e42877c707ace1a79d58317b5f3ff6f8d3fdd849
|
||||
macos-x86_64 77769bbcda13e7763ed81aecdf183ebebf7b0a74
|
||||
winnt-i386 9482b0930db28f681a6c01a5480982e5c5f9564f
|
||||
|
||||
S 2014-01-20 b6400f9
|
||||
freebsd-x86_64 22b1774700781d190061e66666fdc5f9e9c414ee
|
||||
linux-i386 ca6d66dcbe90806e50a46037c3102cffecce14ed
|
||||
|
Loading…
x
Reference in New Issue
Block a user