summary refs log tree commit diff
path: root/src/test/bench
diff options
context:
space:
mode:
authorSteven Stewart-Gallus <sstewartgallus00@mylangara.bc.ca>2013-07-22 13:57:40 -0700
committerSteven Stewart-Gallus <sstewartgallus00@mylangara.bc.ca>2013-07-27 22:06:29 -0700
commitd0b7515aedcaa161bb206e651a374d7ff27e52a7 (patch)
tree9497eea70b9db687a4d6bd4f84bcefa836451b1d /src/test/bench
parent3078e83c3f1a643ddbdefa78095e4fbda3cecc02 (diff)
downloadrust-d0b7515aedcaa161bb206e651a374d7ff27e52a7.tar.gz
rust-d0b7515aedcaa161bb206e651a374d7ff27e52a7.zip
Change concurrency primitives to standard naming conventions
To be more specific:

`UPPERCASETYPE` was changed to `UppercaseType`
`type_new` was changed to `Type::new`
`type_function(value)` was changed to `value.method()`
Diffstat (limited to 'src/test/bench')
-rw-r--r--src/test/bench/graph500-bfs.rs6
-rw-r--r--src/test/bench/msgsend-ring-mutex-arcs.rs8
-rw-r--r--src/test/bench/msgsend-ring-rw-arcs.rs8
3 files changed, 11 insertions, 11 deletions
diff --git a/src/test/bench/graph500-bfs.rs b/src/test/bench/graph500-bfs.rs
index f17b6658f9d..00add20fb7d 100644
--- a/src/test/bench/graph500-bfs.rs
+++ b/src/test/bench/graph500-bfs.rs
@@ -230,7 +230,7 @@ fn bfs2(graph: graph, key: node_id) -> bfs_result {
 }
 
 /// A parallel version of the bfs function.
-fn pbfs(graph: &arc::ARC<graph>, key: node_id) -> bfs_result {
+fn pbfs(graph: &arc::Arc<graph>, key: node_id) -> bfs_result {
     // This works by doing functional updates of a color vector.
 
     let graph_vec = graph.get(); // FIXME #3387 requires this temp
@@ -263,7 +263,7 @@ fn pbfs(graph: &arc::ARC<graph>, key: node_id) -> bfs_result {
         i += 1;
         let old_len = colors.len();
 
-        let color = arc::ARC(colors);
+        let color = arc::Arc::new(colors);
 
         let color_vec = color.get(); // FIXME #3387 requires this temp
         colors = do par::mapi(*color_vec) {
@@ -444,7 +444,7 @@ fn main() {
     let mut total_seq = 0.0;
     let mut total_par = 0.0;
 
-    let graph_arc = arc::ARC(graph.clone());
+    let graph_arc = arc::Arc::new(graph.clone());
 
     do gen_search_keys(graph, num_keys).map() |root| {
         io::stdout().write_line("");
diff --git a/src/test/bench/msgsend-ring-mutex-arcs.rs b/src/test/bench/msgsend-ring-mutex-arcs.rs
index 0fa641e395e..c685057874a 100644
--- a/src/test/bench/msgsend-ring-mutex-arcs.rs
+++ b/src/test/bench/msgsend-ring-mutex-arcs.rs
@@ -11,9 +11,9 @@
 // This test creates a bunch of tasks that simultaneously send to each
 // other in a ring. The messages should all be basically
 // independent.
-// This is like msgsend-ring-pipes but adapted to use ARCs.
+// This is like msgsend-ring-pipes but adapted to use Arcs.
 
-// This also serves as a pipes test, because ARCs are implemented with pipes.
+// This also serves as a pipes test, because Arcs are implemented with pipes.
 
 extern mod extra;
 
@@ -26,7 +26,7 @@ use std::os;
 use std::uint;
 
 // A poor man's pipe.
-type pipe = arc::MutexARC<~[uint]>;
+type pipe = arc::MutexArc<~[uint]>;
 
 fn send(p: &pipe, msg: uint) {
     unsafe {
@@ -48,7 +48,7 @@ fn recv(p: &pipe) -> uint {
 }
 
 fn init() -> (pipe,pipe) {
-    let m = arc::MutexARC(~[]);
+    let m = arc::MutexArc::new(~[]);
     ((&m).clone(), m)
 }
 
diff --git a/src/test/bench/msgsend-ring-rw-arcs.rs b/src/test/bench/msgsend-ring-rw-arcs.rs
index 09d1c632d0e..e7def11b266 100644
--- a/src/test/bench/msgsend-ring-rw-arcs.rs
+++ b/src/test/bench/msgsend-ring-rw-arcs.rs
@@ -11,9 +11,9 @@
 // This test creates a bunch of tasks that simultaneously send to each
 // other in a ring. The messages should all be basically
 // independent.
-// This is like msgsend-ring-pipes but adapted to use ARCs.
+// This is like msgsend-ring-pipes but adapted to use Arcs.
 
-// This also serves as a pipes test, because ARCs are implemented with pipes.
+// This also serves as a pipes test, because Arcs are implemented with pipes.
 
 extern mod extra;
 
@@ -26,7 +26,7 @@ use std::os;
 use std::uint;
 
 // A poor man's pipe.
-type pipe = arc::RWARC<~[uint]>;
+type pipe = arc::RWArc<~[uint]>;
 
 fn send(p: &pipe, msg: uint) {
     do p.write_cond |state, cond| {
@@ -44,7 +44,7 @@ fn recv(p: &pipe) -> uint {
 }
 
 fn init() -> (pipe,pipe) {
-    let x = arc::RWARC(~[]);
+    let x = arc::RWArc::new(~[]);
     ((&x).clone(), x)
 }