about summary refs log tree commit diff
path: root/src/libstd/sync
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-03-27 15:09:47 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-03-31 15:17:12 -0700
commit9a3d04ae7629f6f273643b3a14f106726842be6a (patch)
tree7d8d5fc852d9256b31c7ac892ab3df07f0cfe62c /src/libstd/sync
parentf2a5c7a179ab0fc0e415918c1fc5d280a9e02ede (diff)
downloadrust-9a3d04ae7629f6f273643b3a14f106726842be6a.tar.gz
rust-9a3d04ae7629f6f273643b3a14f106726842be6a.zip
std: Switch field privacy as necessary
Diffstat (limited to 'src/libstd/sync')
-rw-r--r--src/libstd/sync/arc.rs2
-rw-r--r--src/libstd/sync/atomics.rs18
-rw-r--r--src/libstd/sync/deque.rs6
-rw-r--r--src/libstd/sync/mpmc_bounded_queue.rs2
-rw-r--r--src/libstd/sync/mpsc_queue.rs4
-rw-r--r--src/libstd/sync/spsc_queue.rs16
6 files changed, 24 insertions, 24 deletions
diff --git a/src/libstd/sync/arc.rs b/src/libstd/sync/arc.rs
index 92974005305..0d0bd740e41 100644
--- a/src/libstd/sync/arc.rs
+++ b/src/libstd/sync/arc.rs
@@ -35,7 +35,7 @@ use ty::Unsafe;
 /// Enforces no shared-memory safety.
 #[unsafe_no_drop_flag]
 pub struct UnsafeArc<T> {
-    priv data: *mut ArcData<T>,
+    data: *mut ArcData<T>,
 }
 
 struct ArcData<T> {
diff --git a/src/libstd/sync/atomics.rs b/src/libstd/sync/atomics.rs
index 6cc2f85bd95..234eae1f97b 100644
--- a/src/libstd/sync/atomics.rs
+++ b/src/libstd/sync/atomics.rs
@@ -116,26 +116,26 @@ use ty::Unsafe;
 
 /// An atomic boolean type.
 pub struct AtomicBool {
-    priv v: Unsafe<uint>,
-    priv nocopy: marker::NoCopy
+    v: Unsafe<uint>,
+    nocopy: marker::NoCopy
 }
 
 /// A signed atomic integer type, supporting basic atomic arithmetic operations
 pub struct AtomicInt {
-    priv v: Unsafe<int>,
-    priv nocopy: marker::NoCopy
+    v: Unsafe<int>,
+    nocopy: marker::NoCopy
 }
 
 /// An unsigned atomic integer type, supporting basic atomic arithmetic operations
 pub struct AtomicUint {
-    priv v: Unsafe<uint>,
-    priv nocopy: marker::NoCopy
+    v: Unsafe<uint>,
+    nocopy: marker::NoCopy
 }
 
 /// An unsafe atomic pointer. Only supports basic atomic operations
 pub struct AtomicPtr<T> {
-    priv p: Unsafe<uint>,
-    priv nocopy: marker::NoCopy
+    p: Unsafe<uint>,
+    nocopy: marker::NoCopy
 }
 
 /// An atomic, nullable unique pointer
@@ -144,7 +144,7 @@ pub struct AtomicPtr<T> {
 /// owned heap objects across tasks.
 #[unsafe_no_drop_flag]
 pub struct AtomicOption<T> {
-    priv p: Unsafe<uint>,
+    p: Unsafe<uint>,
 }
 
 /// Atomic memory orderings
diff --git a/src/libstd/sync/deque.rs b/src/libstd/sync/deque.rs
index 80a5b9ce3bb..d01c89878de 100644
--- a/src/libstd/sync/deque.rs
+++ b/src/libstd/sync/deque.rs
@@ -86,14 +86,14 @@ struct Deque<T> {
 ///
 /// There may only be one worker per deque.
 pub struct Worker<T> {
-    priv deque: UnsafeArc<Deque<T>>,
+    deque: UnsafeArc<Deque<T>>,
 }
 
 /// The stealing half of the work-stealing deque. Stealers have access to the
 /// opposite end of the deque from the worker, and they only have access to the
 /// `steal` method.
 pub struct Stealer<T> {
-    priv deque: UnsafeArc<Deque<T>>,
+    deque: UnsafeArc<Deque<T>>,
 }
 
 /// When stealing some data, this is an enumeration of the possible outcomes.
@@ -116,7 +116,7 @@ pub enum Stolen<T> {
 /// will only use this structure when allocating a new buffer or deallocating a
 /// previous one.
 pub struct BufferPool<T> {
-    priv pool: Exclusive<~[~Buffer<T>]>,
+    pool: Exclusive<~[~Buffer<T>]>,
 }
 
 /// An internal buffer used by the chase-lev deque. This structure is actually
diff --git a/src/libstd/sync/mpmc_bounded_queue.rs b/src/libstd/sync/mpmc_bounded_queue.rs
index dfa962cdb80..12c05c0d61c 100644
--- a/src/libstd/sync/mpmc_bounded_queue.rs
+++ b/src/libstd/sync/mpmc_bounded_queue.rs
@@ -54,7 +54,7 @@ struct State<T> {
 }
 
 pub struct Queue<T> {
-    priv state: UnsafeArc<State<T>>,
+    state: UnsafeArc<State<T>>,
 }
 
 impl<T: Send> State<T> {
diff --git a/src/libstd/sync/mpsc_queue.rs b/src/libstd/sync/mpsc_queue.rs
index 9d69f2b3b08..142a6239df6 100644
--- a/src/libstd/sync/mpsc_queue.rs
+++ b/src/libstd/sync/mpsc_queue.rs
@@ -67,8 +67,8 @@ struct Node<T> {
 /// may be safely shared so long as it is guaranteed that there is only one
 /// popper at a time (many pushers are allowed).
 pub struct Queue<T> {
-    priv head: AtomicPtr<Node<T>>,
-    priv tail: *mut Node<T>,
+    head: AtomicPtr<Node<T>>,
+    tail: *mut Node<T>,
 }
 
 impl<T> Node<T> {
diff --git a/src/libstd/sync/spsc_queue.rs b/src/libstd/sync/spsc_queue.rs
index 9277587e587..4e043ecf171 100644
--- a/src/libstd/sync/spsc_queue.rs
+++ b/src/libstd/sync/spsc_queue.rs
@@ -55,19 +55,19 @@ struct Node<T> {
 /// time.
 pub struct Queue<T> {
     // consumer fields
-    priv tail: *mut Node<T>, // where to pop from
-    priv tail_prev: AtomicPtr<Node<T>>, // where to pop from
+    tail: *mut Node<T>, // where to pop from
+    tail_prev: AtomicPtr<Node<T>>, // where to pop from
 
     // producer fields
-    priv head: *mut Node<T>,      // where to push to
-    priv first: *mut Node<T>,     // where to get new nodes from
-    priv tail_copy: *mut Node<T>, // between first/tail
+    head: *mut Node<T>,      // where to push to
+    first: *mut Node<T>,     // where to get new nodes from
+    tail_copy: *mut Node<T>, // between first/tail
 
     // Cache maintenance fields. Additions and subtractions are stored
     // separately in order to allow them to use nonatomic addition/subtraction.
-    priv cache_bound: uint,
-    priv cache_additions: AtomicUint,
-    priv cache_subtractions: AtomicUint,
+    cache_bound: uint,
+    cache_additions: AtomicUint,
+    cache_subtractions: AtomicUint,
 }
 
 impl<T: Send> Node<T> {