kernel: only show task name/id in log output if TRACE is enabled

This commit is contained in:
2026-03-29 11:51:05 +01:00
parent 04617e81e3
commit 286016040c
+4
View File
@@ -5,8 +5,12 @@
kern_status_t sys_kern_log(const char *s)
{
#ifdef TRACE
struct task *task = current_task();
struct thread *thread = current_thread();
printk("%s[%d.%d]: %s", task->t_name, task->t_id, thread->tr_id, s);
#else
printk("%s", s);
#endif
return KERN_OK;
}