about summary refs log tree commit diff
path: root/src/libstd/sync/rwlock.rs
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/rwlock.rs
parent5344ae2d4f66f5e8392b325320eeec0af29f503c (diff)
downloadrust-c3dcf9b6bf7b3de4b7b4f51725f2ab814cbdfd38.tar.gz
rust-c3dcf9b6bf7b3de4b7b4f51725f2ab814cbdfd38.zip
fix code and comments referencing RW_LOCK_INIT
Diffstat (limited to 'src/libstd/sync/rwlock.rs')
-rw-r--r--src/libstd/sync/rwlock.rs12
1 files changed, 6 insertions, 6 deletions
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;