Skip to content

Commit a9ab2e5

Browse files
committed
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.
2 parents 4968a8b + bbb6cb8 commit a9ab2e5

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

Cargo.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -1529,9 +1529,9 @@ dependencies = [
15291529

15301530
[[package]]
15311531
name = "hermit-abi"
1532-
version = "0.1.17"
1532+
version = "0.1.19"
15331533
source = "registry+https://github.com/rust-lang/crates.io-index"
1534-
checksum = "5aca5565f760fb5b220e499d72710ed156fdb74e631659e99377d9ebfbd13ae8"
1534+
checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
15351535
dependencies = [
15361536
"compiler_builtins",
15371537
"libc",

library/std/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ dlmalloc = { version = "0.2.1", features = ['rustc-dep-of-std'] }
4242
fortanix-sgx-abi = { version = "0.3.2", features = ['rustc-dep-of-std'] }
4343

4444
[target.'cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"), target_os = "hermit"))'.dependencies]
45-
hermit-abi = { version = "0.1.17", features = ['rustc-dep-of-std'] }
45+
hermit-abi = { version = "0.1.19", features = ['rustc-dep-of-std'] }
4646

4747
[target.wasm32-wasi.dependencies]
4848
wasi = { version = "0.9.0", features = ['rustc-dep-of-std'], default-features = false }

library/std/src/sys/hermit/condvar.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub struct Condvar {
1414
sem2: *const c_void,
1515
}
1616

17-
pub type MovableCondvar = Box<Condvar>;
17+
pub type MovableCondvar = Condvar;
1818

1919
unsafe impl Send for Condvar {}
2020
unsafe impl Sync for Condvar {}

library/std/src/sys/hermit/mutex.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ pub struct Mutex {
156156
inner: Spinlock<MutexInner>,
157157
}
158158

159-
pub type MovableMutex = Box<Mutex>;
159+
pub type MovableMutex = Mutex;
160160

161161
unsafe impl Send for Mutex {}
162162
unsafe impl Sync for Mutex {}

library/std/src/sys/hermit/rwlock.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub struct RWLock {
88
state: UnsafeCell<State>,
99
}
1010

11-
pub type MovableRWLock = Box<RWLock>;
11+
pub type MovableRWLock = RWLock;
1212

1313
enum State {
1414
Unlocked,

0 commit comments

Comments
 (0)