Skip to content

Commit 06d692f

Browse files
committed
use new interface to initialize Condvar
HermitCore introduce a new interface to intialize conditional variables. Consequently, minor changes are required to support this interface.
1 parent 09739c2 commit 06d692f

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
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

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@ pub struct Condvar {
99

1010
impl Condvar {
1111
pub const fn new() -> Condvar {
12-
Condvar { identifier: 0 }
12+
Condvar {
13+
identifier: 0,
14+
}
1315
}
1416

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

2021
pub unsafe fn notify_one(&self) {
@@ -50,7 +51,6 @@ impl Condvar {
5051
ret
5152
}
5253

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

0 commit comments

Comments
 (0)