MCPcopy Create free account
hub / github.com/chyyuu/os_kernel_lab / wait_with_mutex

Method wait_with_mutex

os/src/sync/condvar.rs:50–57  ·  view source on GitHub ↗
(&self, mutex: Arc<dyn Mutex>)

Source from the content-addressed store, hash-verified

48 }
49
50 pub fn wait_with_mutex(&self, mutex: Arc<dyn Mutex>) {
51 mutex.unlock();
52 self.inner.exclusive_session(|inner| {
53 inner.wait_queue.push_back(current_task().unwrap());
54 });
55 block_current_and_run_next();
56 mutex.lock();
57 }
58}

Callers 1

sys_condvar_waitFunction · 0.80

Calls 5

current_taskFunction · 0.85
unlockMethod · 0.80
exclusive_sessionMethod · 0.80
lockMethod · 0.80

Tested by

no test coverage detected