about summary refs log tree commit diff
path: root/src/libstd/sync
diff options
context:
space:
mode:
authorville-h <ville3.14159@gmail.com>2015-01-04 10:57:05 +0200
committerville-h <ville3.14159@gmail.com>2015-01-04 10:57:05 +0200
commitc3dcf9b6bf7b3de4b7b4f51725f2ab814cbdfd38 (patch)
treecd64d1bb2d572ddb72e1403634f58468bad54048 /src/libstd/sync
parent5344ae2d4f66f5e8392b325320eeec0af29f503c (diff)
downloadrust-c3dcf9b6bf7b3de4b7b4f51725f2ab814cbdfd38.tar.gz
rust-c3dcf9b6bf7b3de4b7b4f51725f2ab814cbdfd38.zip
fix code and comments referencing RW_LOCK_INIT
Diffstat (limited to 'src/libstd/sync')
-rw-r--r--src/libstd/sync/mod.rs2
-rw-r--r--src/libstd/sync/rwlock.rs12
2 files changed, 7 insertions, 7 deletions
diff --git a/src/libstd/sync/mod.rs b/src/libstd/sync/mod.rs
index 0e2b0a441e6..3bb0e257577 100644
--- a/src/libstd/sync/mod.rs
+++ b/src/libstd/sync/mod.rs
@@ -21,7 +21,7 @@ pub use alloc::arc::{Arc, Weak};
 
 pub use self::mutex::{Mutex, MutexGuard, StaticMutex};
 pub use self::mutex::MUTEX_INIT;
-pub use self::rwlock::{RwLock, StaticRwLock, RWLOCK_INIT};
+pub use self::rwlock::{RwLock, StaticRwLock, RW_LOCK_INIT};
 pub use self::rwlock::{RWLockReadGuard, RWLockWriteGuard};
 pub use self::condvar::{Condvar, StaticCondvar, CONDVAR_INIT};
 pub use self::once::{Once, ONCE_INIT};
diff --git a/src/libstd/sync/rwlock.rs b/src/libstd/sync/rwlock.rs
index 7b673838339..f6fffd49dee 100644
--- a/src/libstd/sync/rwlock.rs
+++ b/src/libstd/sync/rwlock.rs
@@ -76,9 +76,9 @@ unsafe impl<T> Sync for RwLock<T> {}
 /// # Example
 ///
 /// ```
-/// use std::sync::{StaticRwLock, RWLOCK_INIT};
+/// use std::sync::{StaticRwLock, RW_LOCK_INIT};
 ///
-/// static LOCK: StaticRwLock = RWLOCK_INIT;
+/// static LOCK: StaticRwLock = RW_LOCK_INIT;
 ///
 /// {
 ///     let _g = LOCK.read().unwrap();
@@ -131,7 +131,7 @@ impl<T: Send + Sync> RwLock<T> {
     /// Creates a new instance of an RwLock which is unlocked and read to go.
     #[stable]
     pub fn new(t: T) -> RwLock<T> {
-        RwLock { inner: box RWLOCK_INIT, data: UnsafeCell::new(t) }
+        RwLock { inner: box RW_LOCK_INIT, data: UnsafeCell::new(t) }
     }
 
     /// Locks this rwlock with shared read access, blocking the current thread
@@ -365,7 +365,7 @@ mod tests {
     use rand::{mod, Rng};
     use sync::mpsc::channel;
     use thread::Thread;
-    use sync::{Arc, RwLock, StaticRwLock, RWLOCK_INIT};
+    use sync::{Arc, RwLock, StaticRwLock, RW_LOCK_INIT};
 
     #[test]
     fn smoke() {
@@ -378,7 +378,7 @@ mod tests {
 
     #[test]
     fn static_smoke() {
-        static R: StaticRwLock = RWLOCK_INIT;
+        static R: StaticRwLock = RW_LOCK_INIT;
         drop(R.read().unwrap());
         drop(R.write().unwrap());
         drop((R.read().unwrap(), R.read().unwrap()));
@@ -388,7 +388,7 @@ mod tests {
 
     #[test]
     fn frob() {
-        static R: StaticRwLock = RWLOCK_INIT;
+        static R: StaticRwLock = RW_LOCK_INIT;
         static N: uint = 10;
         static M: uint = 1000;