15
15
pub use self :: Ordering :: * ;
16
16
17
17
use intrinsics;
18
- use std:: kinds:: marker;
19
18
use cell:: UnsafeCell ;
20
19
use kinds:: Copy ;
21
20
22
21
/// A boolean type which can be safely shared between threads.
23
22
#[ stable]
24
23
pub struct AtomicBool {
25
24
v : UnsafeCell < uint > ,
26
- nocopy : marker:: NoCopy
27
25
}
28
26
29
27
/// A signed integer type which can be safely shared between threads.
30
28
#[ stable]
31
29
pub struct AtomicInt {
32
30
v : UnsafeCell < int > ,
33
- nocopy : marker:: NoCopy
34
31
}
35
32
36
33
/// An unsigned integer type which can be safely shared between threads.
37
34
#[ stable]
38
35
pub struct AtomicUint {
39
36
v : UnsafeCell < uint > ,
40
- nocopy : marker:: NoCopy
41
37
}
42
38
43
39
/// A raw pointer type which can be safely shared between threads.
44
40
#[ stable]
45
41
pub struct AtomicPtr < T > {
46
42
p : UnsafeCell < uint > ,
47
- nocopy : marker:: NoCopy
48
43
}
49
44
50
45
/// Atomic memory orderings
@@ -87,15 +82,15 @@ impl Copy for Ordering {}
87
82
/// An `AtomicBool` initialized to `false`.
88
83
#[ unstable = "may be renamed, pending conventions for static initalizers" ]
89
84
pub const INIT_ATOMIC_BOOL : AtomicBool =
90
- AtomicBool { v : UnsafeCell { value : 0 } , nocopy : marker :: NoCopy } ;
85
+ AtomicBool { v : UnsafeCell { value : 0 } } ;
91
86
/// An `AtomicInt` initialized to `0`.
92
87
#[ unstable = "may be renamed, pending conventions for static initalizers" ]
93
88
pub const INIT_ATOMIC_INT : AtomicInt =
94
- AtomicInt { v : UnsafeCell { value : 0 } , nocopy : marker :: NoCopy } ;
89
+ AtomicInt { v : UnsafeCell { value : 0 } } ;
95
90
/// An `AtomicUint` initialized to `0`.
96
91
#[ unstable = "may be renamed, pending conventions for static initalizers" ]
97
92
pub const INIT_ATOMIC_UINT : AtomicUint =
98
- AtomicUint { v : UnsafeCell { value : 0 , } , nocopy : marker :: NoCopy } ;
93
+ AtomicUint { v : UnsafeCell { value : 0 , } } ;
99
94
100
95
// NB: Needs to be -1 (0b11111111...) to make fetch_nand work correctly
101
96
const UINT_TRUE : uint = -1 ;
@@ -115,7 +110,7 @@ impl AtomicBool {
115
110
#[ stable]
116
111
pub fn new ( v : bool ) -> AtomicBool {
117
112
let val = if v { UINT_TRUE } else { 0 } ;
118
- AtomicBool { v : UnsafeCell :: new ( val) , nocopy : marker :: NoCopy }
113
+ AtomicBool { v : UnsafeCell :: new ( val) }
119
114
}
120
115
121
116
/// Loads a value from the bool.
@@ -355,7 +350,7 @@ impl AtomicInt {
355
350
#[ inline]
356
351
#[ stable]
357
352
pub fn new ( v : int ) -> AtomicInt {
358
- AtomicInt { v : UnsafeCell :: new ( v) , nocopy : marker :: NoCopy }
353
+ AtomicInt { v : UnsafeCell :: new ( v) }
359
354
}
360
355
361
356
/// Loads a value from the int.
@@ -541,7 +536,7 @@ impl AtomicUint {
541
536
#[ inline]
542
537
#[ stable]
543
538
pub fn new ( v : uint ) -> AtomicUint {
544
- AtomicUint { v : UnsafeCell :: new ( v) , nocopy : marker :: NoCopy }
539
+ AtomicUint { v : UnsafeCell :: new ( v) }
545
540
}
546
541
547
542
/// Loads a value from the uint.
@@ -728,7 +723,7 @@ impl<T> AtomicPtr<T> {
728
723
#[ inline]
729
724
#[ stable]
730
725
pub fn new ( p : * mut T ) -> AtomicPtr < T > {
731
- AtomicPtr { p : UnsafeCell :: new ( p as uint ) , nocopy : marker :: NoCopy }
726
+ AtomicPtr { p : UnsafeCell :: new ( p as uint ) }
732
727
}
733
728
734
729
/// Loads a value from the pointer.
0 commit comments