mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user