summaryrefslogtreecommitdiff
path: root/kern/task.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2013-05-15 23:31:42 +0200
committerRichard Braun <rbraun@sceen.net>2013-05-16 00:11:37 +0200
commit2b89ca9ed9d8188a5fdff8ceaabc07fe86b43ad3 (patch)
treeedf9e0e3ff1ef9cd0f479b7a3baf58c1fa39da5b /kern/task.c
parent683050a0eebf8678496bdd8200408361266d6f6e (diff)
kern/task: fix task creation
The kernel task was inserted instead of the newly created task on task creation (!). Fix that dumb mistake. In addition, insert the new task at the end of the task list.
Diffstat (limited to 'kern/task.c')
-rw-r--r--kern/task.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kern/task.c b/kern/task.c
index 88edda3e..51559434 100644
--- a/kern/task.c
+++ b/kern/task.c
@@ -86,7 +86,7 @@ task_create(struct task **taskp, const char *name)
task_init(task, name, map);
spinlock_lock(&task_list_lock);
- list_insert_head(&task_list, &kernel_task->node);
+ list_insert_tail(&task_list, &task->node);
spinlock_unlock(&task_list_lock);
*taskp = task;