diff options
Diffstat (limited to 'src/libcore/sync/atomic.rs')
| -rw-r--r-- | src/libcore/sync/atomic.rs | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/libcore/sync/atomic.rs b/src/libcore/sync/atomic.rs index 1e2b18bf9b0..e98194c17c8 100644 --- a/src/libcore/sync/atomic.rs +++ b/src/libcore/sync/atomic.rs @@ -373,7 +373,7 @@ impl AtomicBool { /// ``` #[inline] #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(any(stage0, target_has_atomic = "cas"))] + #[cfg(target_has_atomic = "cas")] pub fn swap(&self, val: bool, order: Ordering) -> bool { unsafe { atomic_swap(self.v.get(), val as u8, order) != 0 } } @@ -404,7 +404,7 @@ impl AtomicBool { /// ``` #[inline] #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(any(stage0, target_has_atomic = "cas"))] + #[cfg(target_has_atomic = "cas")] pub fn compare_and_swap(&self, current: bool, new: bool, order: Ordering) -> bool { match self.compare_exchange(current, new, order, strongest_failure_ordering(order)) { Ok(x) => x, @@ -450,7 +450,7 @@ impl AtomicBool { /// ``` #[inline] #[stable(feature = "extended_compare_and_swap", since = "1.10.0")] - #[cfg(any(stage0, target_has_atomic = "cas"))] + #[cfg(target_has_atomic = "cas")] pub fn compare_exchange(&self, current: bool, new: bool, @@ -542,7 +542,7 @@ impl AtomicBool { /// ``` #[inline] #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(any(stage0, target_has_atomic = "cas"))] + #[cfg(target_has_atomic = "cas")] pub fn fetch_and(&self, val: bool, order: Ordering) -> bool { unsafe { atomic_and(self.v.get(), val as u8, order) != 0 } } @@ -574,7 +574,7 @@ impl AtomicBool { /// ``` #[inline] #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(any(stage0, target_has_atomic = "cas"))] + #[cfg(target_has_atomic = "cas")] pub fn fetch_nand(&self, val: bool, order: Ordering) -> bool { // We can't use atomic_nand here because it can result in a bool with // an invalid value. This happens because the atomic operation is done @@ -617,7 +617,7 @@ impl AtomicBool { /// ``` #[inline] #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(any(stage0, target_has_atomic = "cas"))] + #[cfg(target_has_atomic = "cas")] pub fn fetch_or(&self, val: bool, order: Ordering) -> bool { unsafe { atomic_or(self.v.get(), val as u8, order) != 0 } } @@ -648,7 +648,7 @@ impl AtomicBool { /// ``` #[inline] #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(any(stage0, target_has_atomic = "cas"))] + #[cfg(target_has_atomic = "cas")] pub fn fetch_xor(&self, val: bool, order: Ordering) -> bool { unsafe { atomic_xor(self.v.get(), val as u8, order) != 0 } } @@ -795,7 +795,7 @@ impl<T> AtomicPtr<T> { /// ``` #[inline] #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(any(stage0, target_has_atomic = "cas"))] + #[cfg(target_has_atomic = "cas")] pub fn swap(&self, ptr: *mut T, order: Ordering) -> *mut T { unsafe { atomic_swap(self.p.get() as *mut usize, ptr as usize, order) as *mut T } } @@ -825,7 +825,7 @@ impl<T> AtomicPtr<T> { /// ``` #[inline] #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(any(stage0, target_has_atomic = "cas"))] + #[cfg(target_has_atomic = "cas")] pub fn compare_and_swap(&self, current: *mut T, new: *mut T, order: Ordering) -> *mut T { match self.compare_exchange(current, new, order, strongest_failure_ordering(order)) { Ok(x) => x, @@ -864,7 +864,7 @@ impl<T> AtomicPtr<T> { /// ``` #[inline] #[stable(feature = "extended_compare_and_swap", since = "1.10.0")] - #[cfg(any(stage0, target_has_atomic = "cas"))] + #[cfg(target_has_atomic = "cas")] pub fn compare_exchange(&self, current: *mut T, new: *mut T, @@ -1151,7 +1151,7 @@ assert_eq!(some_var.swap(10, Ordering::Relaxed), 5); ```"), #[inline] #[$stable] - #[cfg(any(stage0, target_has_atomic = "cas"))] + #[cfg(target_has_atomic = "cas")] pub fn swap(&self, val: $int_type, order: Ordering) -> $int_type { unsafe { atomic_swap(self.v.get(), val, order) } } @@ -1184,7 +1184,7 @@ assert_eq!(some_var.load(Ordering::Relaxed), 10); ```"), #[inline] #[$stable] - #[cfg(any(stage0, target_has_atomic = "cas"))] + #[cfg(target_has_atomic = "cas")] pub fn compare_and_swap(&self, current: $int_type, new: $int_type, @@ -1238,7 +1238,7 @@ assert_eq!(some_var.load(Ordering::Relaxed), 10); ```"), #[inline] #[$stable_cxchg] - #[cfg(any(stage0, target_has_atomic = "cas"))] + #[cfg(target_has_atomic = "cas")] pub fn compare_exchange(&self, current: $int_type, new: $int_type, @@ -1693,7 +1693,7 @@ atomic_int!{ } #[inline] -#[cfg(any(stage0, target_has_atomic = "cas"))] +#[cfg(target_has_atomic = "cas")] fn strongest_failure_ordering(order: Ordering) -> Ordering { match order { Release => Relaxed, @@ -1730,7 +1730,7 @@ unsafe fn atomic_load<T>(dst: *const T, order: Ordering) -> T { } #[inline] -#[cfg(any(stage0, target_has_atomic = "cas"))] +#[cfg(target_has_atomic = "cas")] unsafe fn atomic_swap<T>(dst: *mut T, val: T, order: Ordering) -> T { match order { Acquire => intrinsics::atomic_xchg_acq(dst, val), @@ -1769,7 +1769,7 @@ unsafe fn atomic_sub<T>(dst: *mut T, val: T, order: Ordering) -> T { } #[inline] -#[cfg(any(stage0, target_has_atomic = "cas"))] +#[cfg(target_has_atomic = "cas")] unsafe fn atomic_compare_exchange<T>(dst: *mut T, old: T, new: T, |
