From 84ef3ed6947fa99bd017ee298272d43b9bdda382 Mon Sep 17 00:00:00 2001 From: bunnie Date: Thu, 23 May 2024 16:49:39 +0800 Subject: [PATCH] add thread reporting to irq entry --- kernel/src/arch/riscv/irq.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/src/arch/riscv/irq.rs b/kernel/src/arch/riscv/irq.rs index 8207b98db..2a6f0d737 100644 --- a/kernel/src/arch/riscv/irq.rs +++ b/kernel/src/arch/riscv/irq.rs @@ -200,7 +200,8 @@ pub extern "C" fn trap_handler( { let pid = current_pid(); let ex = RiscvException::from_regs(sc.bits(), sepc::read(), stval::read()); - println!("IRQ -- KERNEL({}): RISC-V fault: {}", pid, ex); + let tid = ArchProcess::with_current(|p| p.current_tid()); + println!("IRQ ({}.{}): {}", pid, tid, ex); } match ex { // Syscall