about summary refs log tree commit diff
path: root/src/libsync
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsync')
-rw-r--r--src/libsync/atomic.rs2
-rw-r--r--src/libsync/comm/mod.rs12
-rw-r--r--src/libsync/deque.rs10
-rw-r--r--src/libsync/lock.rs10
-rw-r--r--src/libsync/raw.rs2
5 files changed, 18 insertions, 18 deletions
diff --git a/src/libsync/atomic.rs b/src/libsync/atomic.rs
index 101d869451c..31b993d8bab 100644
--- a/src/libsync/atomic.rs
+++ b/src/libsync/atomic.rs
@@ -25,7 +25,7 @@
 //!
 //! [1]: http://gcc.gnu.org/wiki/Atomic/GCCMM/AtomicSync
 //!
-//! Atomic variables are safe to share between threads (they implement `Share`)
+//! Atomic variables are safe to share between threads (they implement `Sync`)
 //! but they do not themselves provide the mechanism for sharing. The most
 //! common way to share an atomic variable is to put it into an `Arc` (an
 //! atomically-reference-counted shared pointer).
diff --git a/src/libsync/comm/mod.rs b/src/libsync/comm/mod.rs
index eff4cea1c43..45016b97566 100644
--- a/src/libsync/comm/mod.rs
+++ b/src/libsync/comm/mod.rs
@@ -375,7 +375,7 @@ pub struct Receiver<T> {
     inner: UnsafeCell<Flavor<T>>,
     receives: Cell<uint>,
     // can't share in an arc
-    marker: marker::NoShare,
+    marker: marker::NoSync,
 }
 
 /// An iterator over messages on a receiver, this iterator will block
@@ -393,7 +393,7 @@ pub struct Sender<T> {
     inner: UnsafeCell<Flavor<T>>,
     sends: Cell<uint>,
     // can't share in an arc
-    marker: marker::NoShare,
+    marker: marker::NoSync,
 }
 
 /// The sending-half of Rust's synchronous channel type. This half can only be
@@ -402,7 +402,7 @@ pub struct Sender<T> {
 pub struct SyncSender<T> {
     inner: Arc<UnsafeCell<sync::Packet<T>>>,
     // can't share in an arc
-    marker: marker::NoShare,
+    marker: marker::NoSync,
 }
 
 /// This enumeration is the list of the possible reasons that try_recv could not
@@ -537,7 +537,7 @@ impl<T: Send> Sender<T> {
         Sender {
             inner: UnsafeCell::new(inner),
             sends: Cell::new(0),
-            marker: marker::NoShare,
+            marker: marker::NoSync,
         }
     }
 
@@ -713,7 +713,7 @@ impl<T: Send> Drop for Sender<T> {
 
 impl<T: Send> SyncSender<T> {
     fn new(inner: Arc<UnsafeCell<sync::Packet<T>>>) -> SyncSender<T> {
-        SyncSender { inner: inner, marker: marker::NoShare }
+        SyncSender { inner: inner, marker: marker::NoSync }
     }
 
     /// Sends a value on this synchronous channel.
@@ -801,7 +801,7 @@ impl<T: Send> Drop for SyncSender<T> {
 
 impl<T: Send> Receiver<T> {
     fn new(inner: Flavor<T>) -> Receiver<T> {
-        Receiver { inner: UnsafeCell::new(inner), receives: Cell::new(0), marker: marker::NoShare }
+        Receiver { inner: UnsafeCell::new(inner), receives: Cell::new(0), marker: marker::NoSync }
     }
 
     /// Blocks waiting for a value on this receiver
diff --git a/src/libsync/deque.rs b/src/libsync/deque.rs
index d5a05e7a681..e70a730dc3a 100644
--- a/src/libsync/deque.rs
+++ b/src/libsync/deque.rs
@@ -87,7 +87,7 @@ struct Deque<T> {
 /// There may only be one worker per deque.
 pub struct Worker<T> {
     deque: Arc<Deque<T>>,
-    noshare: marker::NoShare,
+    noshare: marker::NoSync,
 }
 
 /// The stealing half of the work-stealing deque. Stealers have access to the
@@ -95,7 +95,7 @@ pub struct Worker<T> {
 /// `steal` method.
 pub struct Stealer<T> {
     deque: Arc<Deque<T>>,
-    noshare: marker::NoShare,
+    noshare: marker::NoSync,
 }
 
 /// When stealing some data, this is an enumeration of the possible outcomes.
@@ -153,8 +153,8 @@ impl<T: Send> BufferPool<T> {
     pub fn deque(&self) -> (Worker<T>, Stealer<T>) {
         let a = Arc::new(Deque::new(self.clone()));
         let b = a.clone();
-        (Worker { deque: a, noshare: marker::NoShare },
-         Stealer { deque: b, noshare: marker::NoShare })
+        (Worker { deque: a, noshare: marker::NoSync },
+         Stealer { deque: b, noshare: marker::NoSync })
     }
 
     fn alloc(&mut self, bits: uint) -> Box<Buffer<T>> {
@@ -217,7 +217,7 @@ impl<T: Send> Stealer<T> {
 
 impl<T: Send> Clone for Stealer<T> {
     fn clone(&self) -> Stealer<T> {
-        Stealer { deque: self.deque.clone(), noshare: marker::NoShare }
+        Stealer { deque: self.deque.clone(), noshare: marker::NoSync }
     }
 }
 
diff --git a/src/libsync/lock.rs b/src/libsync/lock.rs
index 665cd48a278..b07d06ca18e 100644
--- a/src/libsync/lock.rs
+++ b/src/libsync/lock.rs
@@ -298,7 +298,7 @@ pub struct RWLockReadGuard<'a, T> {
     _guard: raw::RWLockReadGuard<'a>,
 }
 
-impl<T: Send + Share> RWLock<T> {
+impl<T: Send + Sync> RWLock<T> {
     /// Create a reader/writer lock with the supplied data.
     pub fn new(user_data: T) -> RWLock<T> {
         RWLock::new_with_condvars(user_data, 1)
@@ -359,7 +359,7 @@ impl<T: Send + Share> RWLock<T> {
     }
 }
 
-impl<'a, T: Send + Share> RWLockWriteGuard<'a, T> {
+impl<'a, T: Send + Sync> RWLockWriteGuard<'a, T> {
     /// Consumes this write lock token, returning a new read lock token.
     ///
     /// This will allow pending readers to come into the lock.
@@ -375,13 +375,13 @@ impl<'a, T: Send + Share> RWLockWriteGuard<'a, T> {
     }
 }
 
-impl<'a, T: Send + Share> Deref<T> for RWLockReadGuard<'a, T> {
+impl<'a, T: Send + Sync> Deref<T> for RWLockReadGuard<'a, T> {
     fn deref<'a>(&'a self) -> &'a T { self._data }
 }
-impl<'a, T: Send + Share> Deref<T> for RWLockWriteGuard<'a, T> {
+impl<'a, T: Send + Sync> Deref<T> for RWLockWriteGuard<'a, T> {
     fn deref<'a>(&'a self) -> &'a T { &*self._data }
 }
-impl<'a, T: Send + Share> DerefMut<T> for RWLockWriteGuard<'a, T> {
+impl<'a, T: Send + Sync> DerefMut<T> for RWLockWriteGuard<'a, T> {
     fn deref_mut<'a>(&'a mut self) -> &'a mut T { &mut *self._data }
 }
 
diff --git a/src/libsync/raw.rs b/src/libsync/raw.rs
index 49f60fe6f00..c42d567fc18 100644
--- a/src/libsync/raw.rs
+++ b/src/libsync/raw.rs
@@ -87,7 +87,7 @@ impl WaitQueue {
 // The building-block used to make semaphores, mutexes, and rwlocks.
 struct Sem<Q> {
     lock: mutex::Mutex,
-    // n.b, we need Sem to be `Share`, but the WaitQueue type is not send/share
+    // n.b, we need Sem to be `Sync`, but the WaitQueue type is not send/share
     //      (for good reason). We have an internal invariant on this semaphore,
     //      however, that the queue is never accessed outside of a locked
     //      context.