Rollup merge of #97879 - hermitcore:condvar, r=Dylan-DPC
remove unneeded code The init function isn't longer part of `Condvar`. Consequently, we removed the implementation for the target os `hermit`.
This commit is contained in:
commit
ef56a1e9c9
@ -24,11 +24,6 @@ pub const fn new() -> Condvar {
|
||||
Condvar { counter: AtomicUsize::new(0), sem1: ptr::null(), sem2: ptr::null() }
|
||||
}
|
||||
|
||||
pub unsafe fn init(&mut self) {
|
||||
let _ = abi::sem_init(&mut self.sem1 as *mut *const c_void, 0);
|
||||
let _ = abi::sem_init(&mut self.sem2 as *mut *const c_void, 0);
|
||||
}
|
||||
|
||||
pub unsafe fn notify_one(&self) {
|
||||
if self.counter.load(SeqCst) > 0 {
|
||||
self.counter.fetch_sub(1, SeqCst);
|
||||
|
Loading…
Reference in New Issue
Block a user