Fix compilation with the debugger feature enabled

This commit is contained in:
bjorn3
2026-03-07 12:19:24 +01:00
parent 4c734e461a
commit ea847f428f
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -297,8 +297,8 @@ pub fn switch(token: &mut CleanLockToken) -> SwitchResult {
prev_context.syscall_debug_info = percpu
.syscall_debug_info
.replace(next_context.syscall_debug_info);
prev_context.syscall_debug_info.on_switch_from();
next_context.syscall_debug_info.on_switch_to();
prev_context.syscall_debug_info.on_switch_from(token);
next_context.syscall_debug_info.on_switch_to(token);
}
percpu
+4 -4
View File
@@ -211,13 +211,13 @@ impl SyscallDebugInfo {
}
#[cfg(feature = "syscall_debug")]
pub fn on_switch_from(&mut self) {
let now = crate::time::monotonic();
pub fn on_switch_from(&mut self, token: &mut CleanLockToken) {
let now = crate::time::monotonic(token);
self.accumulated_time += now - core::mem::replace(&mut self.this_switch_time, now);
}
#[cfg(feature = "syscall_debug")]
pub fn on_switch_to(&mut self) {
self.this_switch_time = crate::time::monotonic();
pub fn on_switch_to(&mut self, token: &mut CleanLockToken) {
self.this_switch_time = crate::time::monotonic(token);
}
}