login
Header Space

 
 

[PATCH] signals: document CLD_CONTINUED notification mechanics

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>
Cc: Roland McGrath <roland@...>, <linux-kernel@...>
Date: Sunday, March 9, 2008 - 5:53 pm

A couple of small comments about how CLD_CONTINUED notification works.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>

--- 25/kernel/signal.c~DOC_NOTIFY	2008-03-10 00:11:50.000000000 +0300
+++ 25/kernel/signal.c	2008-03-10 00:47:21.000000000 +0300
@@ -632,6 +632,10 @@ static int prepare_signal(int sig, struc
 			why |= SIGNAL_CLD_STOPPED;
 
 		if (why) {
+			/* The first thread which returns from finish_stop()
+			 * will take ->siglock and notice SIGNAL_CLD_MASK,
+			 * see get_signal_to_deliver().
+			 */
 			signal->flags = why | SIGNAL_STOP_CONTINUED;
 			signal->group_stop_count = 0;
 			signal->group_exit_code = 0;
@@ -1641,7 +1645,7 @@ int get_signal_to_deliver(siginfo_t *inf
 
 relock:
 	spin_lock_irq(&sighand->siglock);
-
+	/* see prepare_signal(SIGCONT) */
 	if (unlikely(signal->flags & SIGNAL_CLD_MASK)) {
 		int why = (signal->flags & SIGNAL_STOP_CONTINUED)
 				? CLD_CONTINUED : CLD_STOPPED;

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] signals: document CLD_CONTINUED notification mechanics, Oleg Nesterov, (Sun Mar 9, 5:53 pm)
speck-geostationary