Skip to content

Commit 7798d19

Browse files
committed
---
yaml --- r: 168959 b: refs/heads/snap-stage3 c: 4236c52 h: refs/heads/master i: 168957: f11d5a3 168955: d25cb89 168951: 55e9c28 168943: 70b9779 168927: 05071d3 168895: 5c885ba 168831: ae1b64b 168703: e76c364 168447: 8d09a69 167935: d791a50 v: v3
1 parent 38f7f91 commit 7798d19

File tree

2 files changed

+7
-25
lines changed

2 files changed

+7
-25
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 5e21e17d9638d14af41e27e5ca9a21c8a1bc0170
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: dc246ae0188500c2e3c62704aa9f8b2f02fd586c
4+
refs/heads/snap-stage3: 4236c52e34cd005af86ea9e5f199daeea9bb8fcb
55
refs/heads/try: 5204084bd2e46af7cc6e0147430e44dd0d657bbb
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/src/libcore/atomic.rs

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ pub struct AtomicBool {
8686
unsafe impl Sync for AtomicBool {}
8787

8888
/// A signed integer type which can be safely shared between threads.
89-
#[stable]
89+
#[unstable = "awaiting int/uint conventions, may be renamed"]
9090
pub struct AtomicInt {
9191
v: UnsafeCell<int>,
9292
}
9393

9494
unsafe impl Sync for AtomicInt {}
9595

9696
/// An unsigned integer type which can be safely shared between threads.
97-
#[stable]
97+
#[unstable = "awaiting int/uint conventions, may be renamed"]
9898
pub struct AtomicUint {
9999
v: UnsafeCell<uint>,
100100
}
@@ -150,11 +150,11 @@ pub enum Ordering {
150150
pub const ATOMIC_BOOL_INIT: AtomicBool =
151151
AtomicBool { v: UnsafeCell { value: 0 } };
152152
/// An `AtomicInt` initialized to `0`.
153-
#[stable]
153+
#[unstable = "awaiting int/uint conventions, may be renamed"]
154154
pub const ATOMIC_INT_INIT: AtomicInt =
155155
AtomicInt { v: UnsafeCell { value: 0 } };
156156
/// An `AtomicUint` initialized to `0`.
157-
#[stable]
157+
#[unstable = "awaiting int/uint conventions, may be renamed"]
158158
pub const ATOMIC_UINT_INIT: AtomicUint =
159159
AtomicUint { v: UnsafeCell { value: 0, } };
160160

@@ -403,6 +403,7 @@ impl AtomicBool {
403403
}
404404
}
405405

406+
#[unstable = "awaiting int/uint conventions, types may change"]
406407
impl AtomicInt {
407408
/// Creates a new `AtomicInt`.
408409
///
@@ -414,7 +415,6 @@ impl AtomicInt {
414415
/// let atomic_forty_two = AtomicInt::new(42);
415416
/// ```
416417
#[inline]
417-
#[stable]
418418
pub fn new(v: int) -> AtomicInt {
419419
AtomicInt {v: UnsafeCell::new(v)}
420420
}
@@ -437,7 +437,6 @@ impl AtomicInt {
437437
/// let value = some_int.load(Ordering::Relaxed);
438438
/// ```
439439
#[inline]
440-
#[stable]
441440
pub fn load(&self, order: Ordering) -> int {
442441
unsafe { atomic_load(self.v.get() as *const int, order) }
443442
}
@@ -460,7 +459,6 @@ impl AtomicInt {
460459
///
461460
/// Panics if `order` is `Acquire` or `AcqRel`.
462461
#[inline]
463-
#[stable]
464462
pub fn store(&self, val: int, order: Ordering) {
465463
unsafe { atomic_store(self.v.get(), val, order); }
466464
}
@@ -479,7 +477,6 @@ impl AtomicInt {
479477
/// let value = some_int.swap(10, Ordering::Relaxed);
480478
/// ```
481479
#[inline]
482-
#[stable]
483480
pub fn swap(&self, val: int, order: Ordering) -> int {
484481
unsafe { atomic_swap(self.v.get(), val, order) }
485482
}
@@ -501,7 +498,6 @@ impl AtomicInt {
501498
/// let value = some_int.compare_and_swap(5, 10, Ordering::Relaxed);
502499
/// ```
503500
#[inline]
504-
#[stable]
505501
pub fn compare_and_swap(&self, old: int, new: int, order: Ordering) -> int {
506502
unsafe { atomic_compare_and_swap(self.v.get(), old, new, order) }
507503
}
@@ -518,7 +514,6 @@ impl AtomicInt {
518514
/// assert_eq!(10, foo.load(Ordering::SeqCst));
519515
/// ```
520516
#[inline]
521-
#[stable]
522517
pub fn fetch_add(&self, val: int, order: Ordering) -> int {
523518
unsafe { atomic_add(self.v.get(), val, order) }
524519
}
@@ -535,7 +530,6 @@ impl AtomicInt {
535530
/// assert_eq!(-10, foo.load(Ordering::SeqCst));
536531
/// ```
537532
#[inline]
538-
#[stable]
539533
pub fn fetch_sub(&self, val: int, order: Ordering) -> int {
540534
unsafe { atomic_sub(self.v.get(), val, order) }
541535
}
@@ -551,7 +545,6 @@ impl AtomicInt {
551545
/// assert_eq!(0b101101, foo.fetch_and(0b110011, Ordering::SeqCst));
552546
/// assert_eq!(0b100001, foo.load(Ordering::SeqCst));
553547
#[inline]
554-
#[stable]
555548
pub fn fetch_and(&self, val: int, order: Ordering) -> int {
556549
unsafe { atomic_and(self.v.get(), val, order) }
557550
}
@@ -567,7 +560,6 @@ impl AtomicInt {
567560
/// assert_eq!(0b101101, foo.fetch_or(0b110011, Ordering::SeqCst));
568561
/// assert_eq!(0b111111, foo.load(Ordering::SeqCst));
569562
#[inline]
570-
#[stable]
571563
pub fn fetch_or(&self, val: int, order: Ordering) -> int {
572564
unsafe { atomic_or(self.v.get(), val, order) }
573565
}
@@ -583,12 +575,12 @@ impl AtomicInt {
583575
/// assert_eq!(0b101101, foo.fetch_xor(0b110011, Ordering::SeqCst));
584576
/// assert_eq!(0b011110, foo.load(Ordering::SeqCst));
585577
#[inline]
586-
#[stable]
587578
pub fn fetch_xor(&self, val: int, order: Ordering) -> int {
588579
unsafe { atomic_xor(self.v.get(), val, order) }
589580
}
590581
}
591582

583+
#[unstable = "awaiting int/uint conventions, types may change"]
592584
impl AtomicUint {
593585
/// Creates a new `AtomicUint`.
594586
///
@@ -600,7 +592,6 @@ impl AtomicUint {
600592
/// let atomic_forty_two = AtomicUint::new(42u);
601593
/// ```
602594
#[inline]
603-
#[stable]
604595
pub fn new(v: uint) -> AtomicUint {
605596
AtomicUint { v: UnsafeCell::new(v) }
606597
}
@@ -623,7 +614,6 @@ impl AtomicUint {
623614
/// let value = some_uint.load(Ordering::Relaxed);
624615
/// ```
625616
#[inline]
626-
#[stable]
627617
pub fn load(&self, order: Ordering) -> uint {
628618
unsafe { atomic_load(self.v.get() as *const uint, order) }
629619
}
@@ -646,7 +636,6 @@ impl AtomicUint {
646636
///
647637
/// Panics if `order` is `Acquire` or `AcqRel`.
648638
#[inline]
649-
#[stable]
650639
pub fn store(&self, val: uint, order: Ordering) {
651640
unsafe { atomic_store(self.v.get(), val, order); }
652641
}
@@ -665,7 +654,6 @@ impl AtomicUint {
665654
/// let value = some_uint.swap(10, Ordering::Relaxed);
666655
/// ```
667656
#[inline]
668-
#[stable]
669657
pub fn swap(&self, val: uint, order: Ordering) -> uint {
670658
unsafe { atomic_swap(self.v.get(), val, order) }
671659
}
@@ -687,7 +675,6 @@ impl AtomicUint {
687675
/// let value = some_uint.compare_and_swap(5, 10, Ordering::Relaxed);
688676
/// ```
689677
#[inline]
690-
#[stable]
691678
pub fn compare_and_swap(&self, old: uint, new: uint, order: Ordering) -> uint {
692679
unsafe { atomic_compare_and_swap(self.v.get(), old, new, order) }
693680
}
@@ -704,7 +691,6 @@ impl AtomicUint {
704691
/// assert_eq!(10, foo.load(Ordering::SeqCst));
705692
/// ```
706693
#[inline]
707-
#[stable]
708694
pub fn fetch_add(&self, val: uint, order: Ordering) -> uint {
709695
unsafe { atomic_add(self.v.get(), val, order) }
710696
}
@@ -721,7 +707,6 @@ impl AtomicUint {
721707
/// assert_eq!(0, foo.load(Ordering::SeqCst));
722708
/// ```
723709
#[inline]
724-
#[stable]
725710
pub fn fetch_sub(&self, val: uint, order: Ordering) -> uint {
726711
unsafe { atomic_sub(self.v.get(), val, order) }
727712
}
@@ -737,7 +722,6 @@ impl AtomicUint {
737722
/// assert_eq!(0b101101, foo.fetch_and(0b110011, Ordering::SeqCst));
738723
/// assert_eq!(0b100001, foo.load(Ordering::SeqCst));
739724
#[inline]
740-
#[stable]
741725
pub fn fetch_and(&self, val: uint, order: Ordering) -> uint {
742726
unsafe { atomic_and(self.v.get(), val, order) }
743727
}
@@ -753,7 +737,6 @@ impl AtomicUint {
753737
/// assert_eq!(0b101101, foo.fetch_or(0b110011, Ordering::SeqCst));
754738
/// assert_eq!(0b111111, foo.load(Ordering::SeqCst));
755739
#[inline]
756-
#[stable]
757740
pub fn fetch_or(&self, val: uint, order: Ordering) -> uint {
758741
unsafe { atomic_or(self.v.get(), val, order) }
759742
}
@@ -769,7 +752,6 @@ impl AtomicUint {
769752
/// assert_eq!(0b101101, foo.fetch_xor(0b110011, Ordering::SeqCst));
770753
/// assert_eq!(0b011110, foo.load(Ordering::SeqCst));
771754
#[inline]
772-
#[stable]
773755
pub fn fetch_xor(&self, val: uint, order: Ordering) -> uint {
774756
unsafe { atomic_xor(self.v.get(), val, order) }
775757
}

0 commit comments

Comments
 (0)