Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2800d8d1 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Linus Torvalds
Browse files

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: default avatarOleg Nesterov <oleg@tv-sign.ru>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 376e1d25
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -798,7 +798,7 @@ static int de_thread(struct task_struct *tsk)
	if (!thread_group_leader(tsk)) {
	if (!thread_group_leader(tsk)) {
		leader = tsk->group_leader;
		leader = tsk->group_leader;


		sig->notify_count = -1;
		sig->notify_count = -1;	/* for exit_notify() */
		for (;;) {
		for (;;) {
			write_lock_irq(&tasklist_lock);
			write_lock_irq(&tasklist_lock);
			if (likely(leader->exit_state))
			if (likely(leader->exit_state))
+1 −0
Original line number Original line Diff line number Diff line
@@ -877,6 +877,7 @@ static void exit_notify(struct task_struct *tsk, int group_dead)
		state = EXIT_DEAD;
		state = EXIT_DEAD;
	tsk->exit_state = state;
	tsk->exit_state = state;


	/* mt-exec, de_thread() is waiting for us */
	if (thread_group_leader(tsk) &&
	if (thread_group_leader(tsk) &&
	    tsk->signal->notify_count < 0 &&
	    tsk->signal->notify_count < 0 &&
	    tsk->signal->group_exit_task)
	    tsk->signal->group_exit_task)