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/sys | |
| 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/sys')
| -rw-r--r-- | src/libstd/sys/hermit/condvar.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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()); } |
