A little correction about what I said in class… I said that technically, a task could have multiple states because it’s a bitmask but not in practice. It seems that was before that, and searching for TASK_KILLABLE in the linux kernel code (and not sched.c only, that was my mistake), you’ll find for example in timer.c :
[code]__set_current_state(TASK_KILLABLE);[/code]
And TASK_KILLABLE is a combinaison of two states… So it’s not just used for convenient “multiple test at once”.