about summary refs log tree commit diff
path: root/src/libstd/sys
diff options
context:
space:
mode:
authorStefan Lankes <slankes@eonerc.rwth-aachen.de>2020-05-17 23:49:18 +0200
committerStefan Lankes <slankes@eonerc.rwth-aachen.de>2020-05-17 23:49:18 +0200
commit06d692febdba7ad9627d23f53aa302488268f2c4 (patch)
tree7f66f9ba613c124441d6e12bd2a9dca7b254176a /src/libstd/sys
parent09739c22db948a7a2ed13e8f466cb22adb1d7818 (diff)
downloadrust-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.rs8
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());
     }