summaryrefslogtreecommitdiffstats
path: root/include/linux/init_task.h
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2010-05-26 14:43:24 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-27 09:12:47 -0700
commitb3ac022cb9dc5883505a88b159d1b240ad1ef405 (patch)
treebffa035303cbe3c5bde048ac3d3154fb57059e2d /include/linux/init_task.h
parentdd98acf74762764fbc4382a1d9a244f11a2658cc (diff)
downloadop-kernel-dev-b3ac022cb9dc5883505a88b159d1b240ad1ef405.zip
op-kernel-dev-b3ac022cb9dc5883505a88b159d1b240ad1ef405.tar.gz
proc: turn signal_struct->count into "int nr_threads"
No functional changes, just s/atomic_t count/int nr_threads/. With the recent changes this counter has a single user, get_nr_threads() And, none of its callers need the really accurate number of threads, not to mention each caller obviously races with fork/exit. It is only used to report this value to the user-space, except first_tid() uses it to avoid the unnecessary while_each_thread() loop in the unlikely case. It is a bit sad we need a word in struct signal_struct for this, perhaps we can change get_nr_threads() to approximate the number of threads using signal->live and kill ->nr_threads later. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Acked-by: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/init_task.h')
-rw-r--r--include/linux/init_task.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index 7996fc2..0551e0d 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -16,7 +16,7 @@ extern struct files_struct init_files;
extern struct fs_struct init_fs;
#define INIT_SIGNALS(sig) { \
- .count = ATOMIC_INIT(1), \
+ .nr_threads = 1, \
.wait_chldexit = __WAIT_QUEUE_HEAD_INITIALIZER(sig.wait_chldexit),\
.shared_pending = { \
.list = LIST_HEAD_INIT(sig.shared_pending.list), \
OpenPOWER on IntegriCloud