diff options
| author | Stefan Lankes <slankes@eonerc.rwth-aachen.de> | 2020-05-17 23:49:18 +0200 |
|---|---|---|
| committer | Stefan Lankes <slankes@eonerc.rwth-aachen.de> | 2020-05-17 23:49:18 +0200 |
| commit | 06d692febdba7ad9627d23f53aa302488268f2c4 (patch) | |
| tree | 7f66f9ba613c124441d6e12bd2a9dca7b254176a /src/libstd | |
| parent | 09739c22db948a7a2ed13e8f466cb22adb1d7818 (diff) | |
| download | rust-06d692febdba7ad9627d23f53aa302488268f2c4.tar.gz rust-06d692febdba7ad9627d23f53aa302488268f2c4.zip | |
use new interface to initialize Condvar
HermitCore introduce a new interface to intialize conditional variables. Consequently, minor changes are required to support this interface.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/Cargo.toml | 2 | ||||
| -rw-r--r-- | src/libstd/sys/hermit/condvar.rs | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/libstd/Cargo.toml b/src/libstd/Cargo.toml index 923d5fa8cac..077ca2a2faa 100644 --- a/src/libstd/Cargo.toml +++ b/src/libstd/Cargo.toml @@ -41,7 +41,7 @@ dlmalloc = { version = "0.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.12", features = ['rustc-dep-of-std'] } +hermit-abi = { version = "0.1.13", 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/src/libstd/sys/hermit/condvar.rs b/src/libstd/sys/hermit/condvar.rs index 5b7f16ce562..ce4f2f2590a 100644 --- a/src/libstd/sys/hermit/condvar.rs +++ b/src/libstd/sys/hermit/condvar.rs @@ -9,12 +9,13 @@ pub struct Condvar { impl Condvar { pub const fn new() -> Condvar { - Condvar { identifier: 0 } + Condvar { + identifier: 0, + } } - #[inline] pub unsafe fn init(&mut self) { - // nothing to do + let _ = abi::init_queue(self.id()); } pub unsafe fn notify_one(&self) { @@ -50,7 +51,6 @@ impl Condvar { ret } - #[inline] pub unsafe fn destroy(&self) { let _ = abi::destroy_queue(self.id()); } |
