IRQ-based VirtIOBlk Access. Plz wait for the virtio-drivers crate to be updated.

This commit is contained in:
Yifan Wu 2022-02-07 14:13:30 -08:00
parent 017758bf2b
commit c6db34e2c7
13 changed files with 258 additions and 22 deletions

View file

@ -28,7 +28,14 @@ impl Condvar {
}
}
pub fn wait(&self, mutex: Arc<dyn Mutex>) {
pub fn wait(&self) {
let mut inner =self.inner.exclusive_access();
inner.wait_queue.push_back(current_task().unwrap());
drop(inner);
block_current_and_run_next();
}
pub fn wait_with_mutex(&self, mutex: Arc<dyn Mutex>) {
mutex.unlock();
let mut inner = self.inner.exclusive_access();
inner.wait_queue.push_back(current_task().unwrap());