1
Fork 0

Fall out of the std::sync rewrite

This commit is contained in:
Alex Crichton 2014-11-24 11:16:40 -08:00
parent 71d4e77db8
commit c3adbd34c4
19 changed files with 99 additions and 188 deletions

View file

@ -12,8 +12,7 @@ use alloc::arc::Arc;
use libc;
use c_str::CString;
use mem;
use rustrt::mutex;
use sync::atomic;
use sync::{atomic, Mutex};
use io::{mod, IoResult, IoError};
use prelude::*;
@ -60,12 +59,12 @@ struct Inner {
// Unused on Linux, where this lock is not necessary.
#[allow(dead_code)]
lock: mutex::NativeMutex
lock: Mutex<()>,
}
impl Inner {
fn new(fd: fd_t) -> Inner {
Inner { fd: fd, lock: unsafe { mutex::NativeMutex::new() } }
Inner { fd: fd, lock: Mutex::new(()) }
}
}