LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Roland McGrath <roland@redhat.com>, linux-kernel@vger.kernel.org
Subject: [PATCH] signals: document CLD_CONTINUED notification mechanics
Date: Mon, 10 Mar 2008 00:53:38 +0300 [thread overview]
Message-ID: <20080309215338.GA2296@tv-sign.ru> (raw)
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;
next reply other threads:[~2008-03-09 21:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-09 21:53 Oleg Nesterov [this message]
2008-03-11 2:17 ` Roland McGrath
2008-03-11 18:36 ` Oleg Nesterov
2008-03-11 20:28 ` Roland McGrath
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080309215338.GA2296@tv-sign.ru \
--to=oleg@tv-sign.ru \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=roland@redhat.com \
--subject='Re: [PATCH] signals: document CLD_CONTINUED notification mechanics' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).