diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2020-10-01 01:06:35 +0200 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2020-10-02 09:47:08 +0200 |
| commit | 58deb7001deceb74cec38590a161d781d5d953b4 (patch) | |
| tree | 27097158ebb5b75a191b13c903d15d5fda0a3140 /library/std/src/sys/unsupported | |
| parent | a8c2d4fc3d29496aa0a3563ec9d44f6222597fe3 (diff) | |
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.
Diffstat (limited to 'library/std/src/sys/unsupported')
| -rw-r--r-- | library/std/src/sys/unsupported/mutex.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/sys/unsupported/mutex.rs b/library/std/src/sys/unsupported/mutex.rs index 9ef8af52eb5..a28f2cf4ffe 100644 --- a/library/std/src/sys/unsupported/mutex.rs +++ b/library/std/src/sys/unsupported/mutex.rs @@ -4,6 +4,8 @@ pub struct Mutex { locked: UnsafeCell<bool>, } +pub type MovableMutex = Box<Mutex>; + unsafe impl Send for Mutex {} unsafe impl Sync for Mutex {} // no threads on this platform |
