mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
redefine thread_group_leader() as exit_signal >= 0
Change de_thread() to set old_leader->exit_signal = -1. This is good for the consistency, it is no longer the leader and all sub-threads have exit_signal = -1 set by copy_process(CLONE_THREAD). And this allows us to micro-optimize thread_group_leader(), it can simply check exit_signal >= 0. This also makes sense because we should move ->group_leader from task_struct to signal_struct. Signed-off-by: Oleg Nesterov <[email protected]> Reviewed-by: Tejun Heo <[email protected]>
This commit is contained in:
parent
d4f7c511c1
commit
087806b128
2 changed files with 5 additions and 2 deletions
|
|
@ -963,6 +963,7 @@ static int de_thread(struct task_struct *tsk)
|
|||
leader->group_leader = tsk;
|
||||
|
||||
tsk->exit_signal = SIGCHLD;
|
||||
leader->exit_signal = -1;
|
||||
|
||||
BUG_ON(leader->exit_state != EXIT_ZOMBIE);
|
||||
leader->exit_state = EXIT_DEAD;
|
||||
|
|
|
|||
Loading…
Reference in a new issue