From: Oleg Nesterov <oleg@tv-sign.ru>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org, Linus Torvalds <torvalds@osdl.org>,
Andrew Morton <akpm@osdl.org>
Subject: [PATCH] fix TASK_STOPPED vs TASK_NONINTERACTIVE interaction
Date: Thu, 29 Sep 2005 19:58:53 +0400 [thread overview]
Message-ID: <433C0F3D.30C19186@tv-sign.ru> (raw)
do_signal_stop:
for_each_thread(t) {
if (t->state < TASK_STOPPED)
++sig->group_stop_count;
}
However, TASK_NONINTERACTIVE > TASK_STOPPED, so this loop will not
count TASK_INTERRUPTIBLE | TASK_NONINTERACTIVE threads.
See also wait_task_stopped(), which checks ->state > TASK_STOPPED.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
--- 2.6.14-rc2/include/linux/sched.h~6_NONINT 2005-09-24 18:33:51.000000000 +0400
+++ 2.6.14-rc2/include/linux/sched.h 2005-09-29 23:42:25.000000000 +0400
@@ -110,11 +110,11 @@ extern unsigned long nr_iowait(void);
#define TASK_RUNNING 0
#define TASK_INTERRUPTIBLE 1
#define TASK_UNINTERRUPTIBLE 2
-#define TASK_STOPPED 4
-#define TASK_TRACED 8
-#define EXIT_ZOMBIE 16
-#define EXIT_DEAD 32
-#define TASK_NONINTERACTIVE 64
+#define TASK_NONINTERACTIVE 4
+#define TASK_STOPPED 8
+#define TASK_TRACED 16
+#define EXIT_ZOMBIE 32
+#define EXIT_DEAD 64
#define __set_task_state(tsk, state_value) \
do { (tsk)->state = (state_value); } while (0)
next reply other threads:[~2005-09-29 15:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-29 15:58 Oleg Nesterov [this message]
2005-09-29 16:02 ` [PATCH] fix TASK_STOPPED vs TASK_NONINTERACTIVE interaction Linus Torvalds
2005-09-29 16:25 ` Paulo Marques
2005-10-03 2:54 ` Coywolf Qi Hunt
2005-10-03 3:24 ` Linus Torvalds
-- strict thread matches above, loose matches on Subject: below --
2005-09-29 21:54 Roland McGrath
2005-09-29 22:15 ` Linus Torvalds
2005-09-30 16:51 ` Oleg Nesterov
2005-09-30 17:18 ` Linus Torvalds
2005-10-01 11:32 ` Oleg Nesterov
2005-10-02 1:12 ` Roland McGrath
2005-10-03 23:49 linux
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=433C0F3D.30C19186@tv-sign.ru \
--to=oleg@tv-sign.ru \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=torvalds@osdl.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.