f9micro/f9-kernel — pull request #84 by georgekang (2014-04-07 09:31:22+00:00)
Title: Thread Removal: Fix thread could not be removed.

Fixes #74

sys_thread_control: Now, utcb is used only for thread creation. Move its
checking for thread creation.

thread_destroy: Because "parent" is usually equal to "caller", we should remove
"thr" first and then move its children to "caller". Otherwise, "parent->t_child"
may be assigned to "thr->t_child". Then, it is incorrect to remove "thr" from
"parent->t_child".