]> git.lizzy.rs Git - rust.git/blob - library/std/src/sys/unsupported/condvar.rs
a578eee8ccce2a121809f814aee7dfadea286f52
[rust.git] / library / std / src / sys / unsupported / condvar.rs
1 use crate::sys::mutex::Mutex;
2 use crate::time::Duration;
3
4 pub struct Condvar {}
5
6 impl Condvar {
7     pub const fn new() -> Condvar {
8         Condvar {}
9     }
10
11     #[inline]
12     pub unsafe fn init(&mut self) {}
13
14     #[inline]
15     pub unsafe fn notify_one(&self) {}
16
17     #[inline]
18     pub unsafe fn notify_all(&self) {}
19
20     pub unsafe fn wait(&self, _mutex: &Mutex) {
21         panic!("condvar wait not supported")
22     }
23
24     pub unsafe fn wait_timeout(&self, _mutex: &Mutex, _dur: Duration) -> bool {
25         panic!("condvar wait not supported");
26     }
27
28     #[inline]
29     pub unsafe fn destroy(&self) {}
30 }