diff --git a/kernel/src/syscall/mod.rs b/kernel/src/syscall/mod.rs index f324f31..10158ac 100644 --- a/kernel/src/syscall/mod.rs +++ b/kernel/src/syscall/mod.rs @@ -394,7 +394,7 @@ impl From for SysError { const SPIN_WAIT_TIMES: usize = 100; -pub fn spin_and_wait(condvars: &[&Condvar], mut action: impl FnMut() -> Option) -> SysResult { +pub fn spin_and_wait(condvars: &[&Condvar], mut action: impl FnMut() -> Option) -> T { for i in 0..SPIN_WAIT_TIMES { if let Some(result) = action() { return result;