提交 2800d8d1 编写于 作者: O Oleg Nesterov 提交者: Linus Torvalds

document de_thread() with exit_notify() connection

Add a couple of small comments, it is not easy to see what this code does.
Signed-off-by: NOleg Nesterov <oleg@tv-sign.ru>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 376e1d25
......@@ -798,7 +798,7 @@ static int de_thread(struct task_struct *tsk)
if (!thread_group_leader(tsk)) {
leader = tsk->group_leader;
sig->notify_count = -1;
sig->notify_count = -1; /* for exit_notify() */
for (;;) {
write_lock_irq(&tasklist_lock);
if (likely(leader->exit_state))
......
......@@ -877,6 +877,7 @@ static void exit_notify(struct task_struct *tsk, int group_dead)
state = EXIT_DEAD;
tsk->exit_state = state;
/* mt-exec, de_thread() is waiting for us */
if (thread_group_leader(tsk) &&
tsk->signal->notify_count < 0 &&
tsk->signal->group_exit_task)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册