sched: all kernel-mode tasks now have negative task ids

This commit is contained in:
2026-02-08 13:09:29 +00:00
parent 18a5325fa7
commit 27bed1a3d3
4 changed files with 18 additions and 26 deletions

View File

@@ -93,7 +93,7 @@ struct thread *create_kernel_thread(void (*fn)(void))
unsigned long flags;
task_lock_irqsave(kernel, &flags);
queue_push_back(&kernel->t_threads, &thr->tr_threads);
queue_push_back(&kernel->t_threads, &thr->tr_parent_entry);
task_unlock_irqrestore(kernel, flags);
schedule_thread_on_cpu(thr);
@@ -115,7 +115,7 @@ struct thread *create_idle_thread(void)
unsigned long flags;
task_lock_irqsave(idle, &flags);
queue_push_back(&idle->t_threads, &thr->tr_threads);
queue_push_back(&idle->t_threads, &thr->tr_parent_entry);
task_unlock_irqrestore(idle, flags);
return thr;