Skip to content

Commit

Permalink
Rollup merge of #97879 - hermitcore:condvar, r=Dylan-DPC
Browse files Browse the repository at this point in the history
remove unneeded code

The init function isn't longer part of `Condvar`. Consequently, we removed the implementation for the target os `hermit`.
  • Loading branch information
matthiaskrgr authored Jun 8, 2022
2 parents d11ab85 + 85b5f74 commit ef56a1e
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions library/std/src/sys/hermit/condvar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ef56a1e

Please sign in to comment.