@@ -86,15 +86,15 @@ pub struct AtomicBool {
8686unsafe 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" ]
9090pub struct AtomicInt {
9191 v : UnsafeCell < int > ,
9292}
9393
9494unsafe 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" ]
9898pub struct AtomicUint {
9999 v : UnsafeCell < uint > ,
100100}
@@ -150,11 +150,11 @@ pub enum Ordering {
150150pub 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" ]
154154pub 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" ]
158158pub 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" ]
406407impl 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" ]
592584impl 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