ungegister_task(): Set task error value to -E_TASK_KILLED.
authorAndre Noll <maan@systemlinux.org>
Mon, 31 Mar 2008 11:11:46 +0000 (13:11 +0200)
committerAndre Noll <maan@systemlinux.org>
Mon, 31 Mar 2008 11:11:46 +0000 (13:11 +0200)
This way, one can be sure that a negative value in t->error means
this task will not be scheduled again.

sched.c

diff --git a/sched.c b/sched.c
index 9976a11..90df593 100644 (file)
--- a/sched.c
+++ b/sched.c
@@ -41,6 +41,8 @@ void unregister_task(struct task *t)
                list_del(&t->pre_select_node);
        if (t->post_select)
                list_del(&t->post_select_node);
+       if (t->error >= 0)
+               t->error = -E_TASK_KILLED;
 };