]> err.no Git - linux-2.6/commitdiff
document de_thread() with exit_notify() connection
authorOleg Nesterov <oleg@tv-sign.ru>
Wed, 30 Apr 2008 07:53:12 +0000 (00:53 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 30 Apr 2008 15:29:38 +0000 (08:29 -0700)
Add a couple of small comments, it is not easy to see what this code does.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/exec.c
kernel/exit.c

index 8fccc276d40d6f69e8ee7e3daf2852f33e823ed1..9f9f931ef949987e29ba89204387c1428e491c66 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -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))
index 413c81ec858e6ea5ef989d9a55ce5d706d15b522..879ed6e1c88336fab0a7689b9240c6dab0899d76 100644 (file)
@@ -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)