Skip to contentSkip to conversation

document de_thread() with exit_notify() connection

PATCH In review Oleg Nesterov 2 participants 3 messages Mar 3, 2008 – Mar 4, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 document de_thread() with exit_notify() connection

Add a couple of small comments, it is not easy to see what this code does.

fs/exec.c renamed from fs/exec.c~7_DOC_EXIT_EXEC +1 -1
@@ -802,7 +802,7 @@ static int de_thread(struct task_struct 
 	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))
kernel/exit.c renamed from kernel/exit.c~7_DOC_EXIT_EXEC +1 -0
@@ -808,6 +808,7 @@ static void exit_notify(struct task_stru
 		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)
#1 lore raw

It's better than nothing! I'd still like to revisit the whole MT exec picture when we can.

Thanks,
Roland

#2 lore raw
Quoted 3 lines · Roland McGrath

I'd still like to revisit the whole MT exec
picture when we can.

Yes, I do remember the previous discussion, and I very much agree with your idea how we should do this.

Oleg.