about summary refs log tree commit diff
path: root/library/std/src/sys/unsupported/condvar.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/sys/unsupported/condvar.rs')
-rw-r--r--library/std/src/sys/unsupported/condvar.rs30
1 files changed, 30 insertions, 0 deletions
diff --git a/library/std/src/sys/unsupported/condvar.rs b/library/std/src/sys/unsupported/condvar.rs
new file mode 100644
index 00000000000..a578eee8ccc
--- /dev/null
+++ b/library/std/src/sys/unsupported/condvar.rs
@@ -0,0 +1,30 @@
+use crate::sys::mutex::Mutex;
+use crate::time::Duration;
+
+pub struct Condvar {}
+
+impl Condvar {
+    pub const fn new() -> Condvar {
+        Condvar {}
+    }
+
+    #[inline]
+    pub unsafe fn init(&mut self) {}
+
+    #[inline]
+    pub unsafe fn notify_one(&self) {}
+
+    #[inline]
+    pub unsafe fn notify_all(&self) {}
+
+    pub unsafe fn wait(&self, _mutex: &Mutex) {
+        panic!("condvar wait not supported")
+    }
+
+    pub unsafe fn wait_timeout(&self, _mutex: &Mutex, _dur: Duration) -> bool {
+        panic!("condvar wait not supported");
+    }
+
+    #[inline]
+    pub unsafe fn destroy(&self) {}
+}