about summary refs log tree commit diff
path: root/src/libstd/io
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-01-02 09:19:00 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-01-02 09:19:00 -0800
commit009ec5d2b0c4ab0e7dc7ab2f6b15754b4da14caf (patch)
tree8b441fd58860857f2e7bf5eabbf2226b92bf13c7 /src/libstd/io
parent0101bbe7acb38e8113c0cafeb7d5ae0be6448e5b (diff)
parentf3a7ec7028c76b3a1c6051131328f372b068e33a (diff)
downloadrust-009ec5d2b0c4ab0e7dc7ab2f6b15754b4da14caf.tar.gz
rust-009ec5d2b0c4ab0e7dc7ab2f6b15754b4da14caf.zip
rollup merge of #20315: alexcrichton/std-sync
Conflicts:
	src/libstd/rt/exclusive.rs
	src/libstd/sync/barrier.rs
	src/libstd/sys/unix/pipe.rs
	src/test/bench/shootout-binarytrees.rs
	src/test/bench/shootout-fannkuch-redux.rs
Diffstat (limited to 'src/libstd/io')
-rw-r--r--src/libstd/io/buffered.rs6
-rw-r--r--src/libstd/io/stdio.rs2
-rw-r--r--src/libstd/io/tempfile.rs2
-rw-r--r--src/libstd/io/test.rs6
4 files changed, 5 insertions, 11 deletions
diff --git a/src/libstd/io/buffered.rs b/src/libstd/io/buffered.rs
index ffd4122492b..852cab500f6 100644
--- a/src/libstd/io/buffered.rs
+++ b/src/libstd/io/buffered.rs
@@ -22,7 +22,6 @@ use result::Result::{Ok, Err};
 use slice::{SliceExt};
 use slice;
 use vec::Vec;
-use kinds::{Send,Sync};
 
 /// Wraps a Reader and buffers input from it
 ///
@@ -52,11 +51,6 @@ pub struct BufferedReader<R> {
     cap: uint,
 }
 
-
-unsafe impl<R: Send> Send for BufferedReader<R> {}
-unsafe impl<R: Send+Sync> Sync for BufferedReader<R> {}
-
-
 impl<R: Reader> BufferedReader<R> {
     /// Creates a new `BufferedReader` with the specified buffer capacity
     pub fn with_capacity(cap: uint, inner: R) -> BufferedReader<R> {
diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs
index 156c37c3be7..ba709b2dc74 100644
--- a/src/libstd/io/stdio.rs
+++ b/src/libstd/io/stdio.rs
@@ -218,7 +218,7 @@ pub fn stdin() -> StdinReader {
     static ONCE: Once = ONCE_INIT;
 
     unsafe {
-        ONCE.doit(|| {
+        ONCE.call_once(|| {
             // The default buffer capacity is 64k, but apparently windows doesn't like
             // 64k reads on stdin. See #13304 for details, but the idea is that on
             // windows we use a slightly smaller buffer that's been seen to be
diff --git a/src/libstd/io/tempfile.rs b/src/libstd/io/tempfile.rs
index c2b4d5a1fa9..5cf86676651 100644
--- a/src/libstd/io/tempfile.rs
+++ b/src/libstd/io/tempfile.rs
@@ -90,7 +90,7 @@ impl TempDir {
             return TempDir::new_in(&abs_tmpdir, suffix);
         }
 
-        static CNT: atomic::AtomicUint = atomic::INIT_ATOMIC_UINT;
+        static CNT: atomic::AtomicUint = atomic::ATOMIC_UINT_INIT;
 
         let mut attempts = 0u;
         loop {
diff --git a/src/libstd/io/test.rs b/src/libstd/io/test.rs
index 7592e7692db..2f87abd0ee2 100644
--- a/src/libstd/io/test.rs
+++ b/src/libstd/io/test.rs
@@ -17,17 +17,17 @@ use prelude::v1::*;
 use libc;
 use os;
 use std::io::net::ip::*;
-use sync::atomic::{AtomicUint, INIT_ATOMIC_UINT, Relaxed};
+use sync::atomic::{AtomicUint, ATOMIC_UINT_INIT, Relaxed};
 
 /// Get a port number, starting at 9600, for use in tests
 pub fn next_test_port() -> u16 {
-    static NEXT_OFFSET: AtomicUint = INIT_ATOMIC_UINT;
+    static NEXT_OFFSET: AtomicUint = ATOMIC_UINT_INIT;
     base_port() + NEXT_OFFSET.fetch_add(1, Relaxed) as u16
 }
 
 /// Get a temporary path which could be the location of a unix socket
 pub fn next_test_unix() -> Path {
-    static COUNT: AtomicUint = INIT_ATOMIC_UINT;
+    static COUNT: AtomicUint = ATOMIC_UINT_INIT;
     // base port and pid are an attempt to be unique between multiple
     // test-runners of different configurations running on one
     // buildbot, the count is to be unique within this executable.