From 88186934960dae4f616df815eb25205c2713f503 Mon Sep 17 00:00:00 2001 From: Flavio Percoco Date: Mon, 22 Dec 2014 17:15:51 +0100 Subject: Relax `Arc` bounds don't require Sync+Send Besides the above making sense, it'll also allow us to make `RacyCell` private and use UnsafeCell instead. --- src/libstd/sys/unix/mutex.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/libstd/sys/unix') diff --git a/src/libstd/sys/unix/mutex.rs b/src/libstd/sys/unix/mutex.rs index 3b0114b3e90..81f8659d6ae 100644 --- a/src/libstd/sys/unix/mutex.rs +++ b/src/libstd/sys/unix/mutex.rs @@ -8,13 +8,12 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use comm::RacyCell; use cell::UnsafeCell; use kinds::Sync; use sys::sync as ffi; use sys_common::mutex; -pub struct Mutex { inner: RacyCell } +pub struct Mutex { inner: UnsafeCell } #[inline] pub unsafe fn raw(m: &Mutex) -> *mut ffi::pthread_mutex_t { @@ -22,7 +21,7 @@ pub unsafe fn raw(m: &Mutex) -> *mut ffi::pthread_mutex_t { } pub const MUTEX_INIT: Mutex = Mutex { - inner: RacyCell(UnsafeCell { value: ffi::PTHREAD_MUTEX_INITIALIZER }), + inner: UnsafeCell { value: ffi::PTHREAD_MUTEX_INITIALIZER }, }; unsafe impl Sync for Mutex {} -- cgit 1.4.1-3-g733a5