lkml.org 
[lkml]   [2008]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 2/2] signals: document CLD_CONTINUED notification mechanics
A couple of small comments about how CLD_CONTINUED notification works.

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

--- 25/kernel/signal.c~2_DOC_NOTIFY 2008-03-12 13:29:42.000000000 +0300
+++ 25/kernel/signal.c 2008-03-12 15:16:52.000000000 +0300
@@ -630,6 +630,11 @@ static int prepare_signal(int sig, struc
why |= SIGNAL_CLD_STOPPED;

if (why) {
+ /*
+ * The first thread which returns from finish_stop()
+ * will take ->siglock, notice SIGNAL_CLD_MASK, and
+ * notify its parent. See get_signal_to_deliver().
+ */
signal->flags = why | SIGNAL_STOP_CONTINUED;
signal->group_stop_count = 0;
signal->group_exit_code = 0;
@@ -1652,7 +1657,7 @@ relock:
try_to_freeze();

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;


\
 
 \ /
  Last update: 2008-03-12 13:37    [W:0.040 / U:0.788 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site