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:
Matthias Krüger 2022-06-08 18:15:05 +02:00 committed by GitHub
commit ef56a1e9c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 5 deletions

View File

@ -24,11 +24,6 @@ impl 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);