Lines Matching refs:inner
34 inner: SpinLock<MutexInner>, field
51 inner: SpinLock::new(MutexInner { in new()
64 let mut inner: SpinLockGuard<MutexInner> = self.inner.lock(); in lock() localVariable
66 if inner.is_locked { in lock()
68 if !self.check_pid_in_wait_list(&inner, ProcessManager::current_pcb().pid()) { in lock()
69 inner.wait_list.push_back(ProcessManager::current_pcb()); in lock()
73 drop(inner); in lock()
77 inner.is_locked = true; in lock()
78 drop(inner); in lock()
93 let mut inner = self.inner.lock(); in try_lock() localVariable
96 if inner.is_locked { in try_lock()
100 inner.is_locked = true; in try_lock()
117 let mut inner: SpinLockGuard<MutexInner> = self.inner.lock(); in unlock() localVariable
119 assert!(inner.is_locked); in unlock()
121 inner.is_locked = false; in unlock()
122 if inner.wait_list.is_empty() { in unlock()
127 let to_wakeup: Arc<ProcessControlBlock> = inner.wait_list.pop_front().unwrap(); in unlock()
128 drop(inner); in unlock()
135 fn check_pid_in_wait_list(&self, inner: &MutexInner, pid: Pid) -> bool { in check_pid_in_wait_list()
136 for p in inner.wait_list.iter() { in check_pid_in_wait_list()