sched: enforce ref-counting on current task/thread pointers

This commit is contained in:
2026-04-01 18:17:05 +01:00
parent 15c2207ab9
commit 512356ac2d
28 changed files with 364 additions and 103 deletions
+4 -2
View File
@@ -6,9 +6,11 @@
kern_status_t sys_kern_log(const char *s)
{
#ifdef TRACE
struct task *task = current_task();
struct thread *thread = current_thread();
struct task *task = get_current_task();
struct thread *thread = get_current_thread();
printk("%s[%d.%d]: %s", task->t_name, task->t_id, thread->tr_id, s);
put_current_thread(thread);
put_current_task(task);
#else
printk("%s", s);
#endif