Skip to content

Commit 2cff5d9

Browse files
authored
Rollup merge of rust-lang#72307 - hermitcore:condvar, r=Mark-Simulacrum
use the new interface to initialize conditional variables HermitCore introduce a new interface to intialize conditional variables. Consequently, minor changes are required to support this interface.
2 parents 2a90664 + 3f47d9d commit 2cff5d9

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

Cargo.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -1439,9 +1439,9 @@ dependencies = [
14391439

14401440
[[package]]
14411441
name = "hermit-abi"
1442-
version = "0.1.12"
1442+
version = "0.1.13"
14431443
source = "registry+https://github.com/rust-lang/crates.io-index"
1444-
checksum = "61565ff7aaace3525556587bd2dc31d4a07071957be715e63ce7b1eccf51a8f4"
1444+
checksum = "91780f809e750b0a89f5544be56617ff6b1227ee485bcb06ebe10cdf89bd3b71"
14451445
dependencies = [
14461446
"compiler_builtins",
14471447
"libc",

src/libstd/Cargo.toml

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

4343
[target.'cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"), target_os = "hermit"))'.dependencies]
44-
hermit-abi = { version = "0.1.12", features = ['rustc-dep-of-std'] }
44+
hermit-abi = { version = "0.1.13", features = ['rustc-dep-of-std'] }
4545

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

src/libstd/sys/hermit/condvar.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ impl Condvar {
1212
Condvar { identifier: 0 }
1313
}
1414

15-
#[inline]
1615
pub unsafe fn init(&mut self) {
17-
// nothing to do
16+
let _ = abi::init_queue(self.id());
1817
}
1918

2019
pub unsafe fn notify_one(&self) {
@@ -50,7 +49,6 @@ impl Condvar {
5049
ret
5150
}
5251

53-
#[inline]
5452
pub unsafe fn destroy(&self) {
5553
let _ = abi::destroy_queue(self.id());
5654
}

0 commit comments

Comments
 (0)