sched: all kernel-mode tasks now have negative task ids
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user