diff options
| author | bors <bors@rust-lang.org> | 2021-08-19 09:08:11 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-08-19 09:08:11 +0000 |
| commit | a9ab2e55395013de116340e4cbfa0bb0263bb658 (patch) | |
| tree | 137c185247866ecdbadb516f412fad9bfe3992ea | |
| parent | 4968a8bbd19cea8713aabff9b1575ec60e208670 (diff) | |
| parent | bbb6cb8969d104e516cb42f5719121ec01ca3e0e (diff) | |
| download | rust-a9ab2e55395013de116340e4cbfa0bb0263bb658.tar.gz rust-a9ab2e55395013de116340e4cbfa0bb0263bb658.zip | |
Auto merge of #88002 - hermitcore:unbox-mutex, r=dtolnay
Unbox mutexes, condvars and rwlocks on hermit [RustyHermit](https://github.com/hermitcore/rusty-hermit) provides now movable synchronization primitives and we are able to unbox mutexes and condvars.
| -rw-r--r-- | Cargo.lock | 4 | ||||
| -rw-r--r-- | library/std/Cargo.toml | 2 | ||||
| -rw-r--r-- | library/std/src/sys/hermit/condvar.rs | 2 | ||||
| -rw-r--r-- | library/std/src/sys/hermit/mutex.rs | 2 | ||||
| -rw-r--r-- | library/std/src/sys/hermit/rwlock.rs | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/Cargo.lock b/Cargo.lock index 3420fe5e61c..14cb1f1641b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1529,9 +1529,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.1.17" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aca5565f760fb5b220e499d72710ed156fdb74e631659e99377d9ebfbd13ae8" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" dependencies = [ "compiler_builtins", "libc", diff --git a/library/std/Cargo.toml b/library/std/Cargo.toml index 64f413acd97..7e260aaa428 100644 --- a/library/std/Cargo.toml +++ b/library/std/Cargo.toml @@ -42,7 +42,7 @@ dlmalloc = { version = "0.2.1", features = ['rustc-dep-of-std'] } fortanix-sgx-abi = { version = "0.3.2", features = ['rustc-dep-of-std'] } [target.'cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"), target_os = "hermit"))'.dependencies] -hermit-abi = { version = "0.1.17", features = ['rustc-dep-of-std'] } +hermit-abi = { version = "0.1.19", features = ['rustc-dep-of-std'] } [target.wasm32-wasi.dependencies] wasi = { version = "0.9.0", features = ['rustc-dep-of-std'], default-features = false } diff --git a/library/std/src/sys/hermit/condvar.rs b/library/std/src/sys/hermit/condvar.rs index b45e8718f08..fa8ef8fc37a 100644 --- a/library/std/src/sys/hermit/condvar.rs +++ b/library/std/src/sys/hermit/condvar.rs @@ -14,7 +14,7 @@ pub struct Condvar { sem2: *const c_void, } -pub type MovableCondvar = Box<Condvar>; +pub type MovableCondvar = Condvar; unsafe impl Send for Condvar {} unsafe impl Sync for Condvar {} diff --git a/library/std/src/sys/hermit/mutex.rs b/library/std/src/sys/hermit/mutex.rs index 4221799114b..691e7e07902 100644 --- a/library/std/src/sys/hermit/mutex.rs +++ b/library/std/src/sys/hermit/mutex.rs @@ -156,7 +156,7 @@ pub struct Mutex { inner: Spinlock<MutexInner>, } -pub type MovableMutex = Box<Mutex>; +pub type MovableMutex = Mutex; unsafe impl Send for Mutex {} unsafe impl Sync for Mutex {} diff --git a/library/std/src/sys/hermit/rwlock.rs b/library/std/src/sys/hermit/rwlock.rs index d2058180121..64eaa2fc482 100644 --- a/library/std/src/sys/hermit/rwlock.rs +++ b/library/std/src/sys/hermit/rwlock.rs @@ -8,7 +8,7 @@ pub struct RWLock { state: UnsafeCell<State>, } -pub type MovableRWLock = Box<RWLock>; +pub type MovableRWLock = RWLock; enum State { Unlocked, |
