]> git.tuebingen.mpg.de Git - paraslash.git/commit
sched: kill task->dead.
authorAndre Noll <maan@systemlinux.org>
Thu, 2 Jan 2014 02:07:01 +0000 (02:07 +0000)
committerAndre Noll <maan@systemlinux.org>
Sun, 25 May 2014 13:39:01 +0000 (15:39 +0200)
commit57a04f35f4e97d5f63079620dab3493832a851af
tree2d7171300ad1fdca1435acab1b0e21d397073e72
parentc52b8398d68a87d8fac858f6681dee5f0b09289d
sched: kill task->dead.

The three possible states of a task are determined by the ->status
and ->dead fields of struct task:

status >= 0, !dead: running
status >= 0, dead: dead (about to be removed from the task list)
status < 0: zombie (dead, but not yet reaped, -status is an error code)

This commit encodes the first two states as two non-negative numbers,
so that the three states become

status == TS_RUNNING: running
status == TS_DEAD: dead
status < 0: zombie

This allows to remove ->dead which improves readability somewhat.
sched.c