Make it possible to have unboxed mutexes on specific platforms.
This commit keeps all mutexes boxed on all platforms, but makes it trivial to remove the box on some platforms later.
This commit is contained in:
parent
a8c2d4fc3d
commit
58deb7001d
10 changed files with 51 additions and 9 deletions
|
@ -5,6 +5,8 @@ pub struct Mutex {
|
|||
inner: UnsafeCell<libc::pthread_mutex_t>,
|
||||
}
|
||||
|
||||
pub type MovableMutex = Box<Mutex>;
|
||||
|
||||
#[inline]
|
||||
pub unsafe fn raw(m: &Mutex) -> *mut libc::pthread_mutex_t {
|
||||
m.inner.get()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue