diff options
| author | Flavio Percoco <flaper87@gmail.com> | 2014-12-22 17:15:51 +0100 |
|---|---|---|
| committer | Flavio Percoco <flaper87@gmail.com> | 2014-12-26 17:26:33 +0100 |
| commit | 88186934960dae4f616df815eb25205c2713f503 (patch) | |
| tree | 10568b070d36a957f6a6aacf726d3dae05f73354 /src/libstd/sys/unix/mutex.rs | |
| parent | 7df17a2868004597bff61348060f423ad2384e04 (diff) | |
| download | rust-88186934960dae4f616df815eb25205c2713f503.tar.gz rust-88186934960dae4f616df815eb25205c2713f503.zip | |
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.
Diffstat (limited to 'src/libstd/sys/unix/mutex.rs')
| -rw-r--r-- | src/libstd/sys/unix/mutex.rs | 5 |
1 files changed, 2 insertions, 3 deletions
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<ffi::pthread_mutex_t> } +pub struct Mutex { inner: UnsafeCell<ffi::pthread_mutex_t> } #[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 {} |
