Fix compilation with the debugger feature enabled
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user