Skip to content

Commit

Permalink
kernel/syscall: Print task name during sys_exit()
Browse files Browse the repository at this point in the history
Print the task name in addition to its exit code to make logging a bit
more informative.

Signed-off-by: Peter Fang <peter.fang@intel.com>
  • Loading branch information
peterfang committed Feb 7, 2025
1 parent 68bbcbd commit 7803da1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kernel/src/syscall/class0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ use core::ffi::c_char;
use syscall::SysCallError;

pub fn sys_exit(exit_code: u32) -> ! {
log::info!("Terminating current task, exit_code {exit_code}");
log::info!(
"Terminating task {}, exit_code {exit_code}",
current_task().get_task_name()
);
unsafe {
current_task_terminated();
}
Expand Down

0 comments on commit 7803da1

Please sign in to comment.