The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 03/18] sysctl extern cleanup - threads
@ 2010-02-20 14:09 Dave Young
  0 siblings, 0 replies; only message in thread
From: Dave Young @ 2010-02-20 14:09 UTC (permalink / raw)
  To: Ingo Molnar, Andrew Morton, Peter Zijlstra, Oleg Nesterov,
	Roland McGrath, James Morris, Rusty Russell, Eric Paris,
	David Howells, Eric W. Biederman, linux-kernel

Extern declarations in sysctl.c should be move to their own head file,
and then include them in relavant .c files.

Move max_threads extern declaration to linux/threads.h

Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
---
 include/linux/threads.h |    1 +
 kernel/fork.c           |    1 +
 kernel/kmod.c           |    3 +--
 kernel/sysctl.c         |    2 +-
 4 files changed, 4 insertions(+), 3 deletions(-)

--- linux-2.6.32.orig/include/linux/threads.h	2010-02-12 12:47:27.001982416 +0800
+++ linux-2.6.32/include/linux/threads.h	2010-02-12 12:48:49.593449580 +0800
@@ -6,6 +6,7 @@
  * The default limit for the nr of threads is now in
  * /proc/sys/kernel/threads-max.
  */
+extern int max_threads;
 
 /*
  * Maximum supported processors.  Setting this smaller saves quite a
--- linux-2.6.32.orig/kernel/fork.c	2010-02-12 12:46:48.602820586 +0800
+++ linux-2.6.32/kernel/fork.c	2010-02-12 12:50:36.868631765 +0800
@@ -65,6 +65,7 @@
 #include <linux/perf_event.h>
 #include <linux/posix-timers.h>
 #include <linux/user-return-notifier.h>
+#include <linux/threads.h>
 
 #include <asm/pgtable.h>
 #include <asm/pgalloc.h>
--- linux-2.6.32.orig/kernel/kmod.c	2010-02-12 12:46:45.736154059 +0800
+++ linux-2.6.32/kernel/kmod.c	2010-02-12 12:49:29.128638259 +0800
@@ -36,12 +36,11 @@
 #include <linux/notifier.h>
 #include <linux/suspend.h>
 #include <linux/rcustring.h>
+#include <linux/threads.h>
 #include <asm/uaccess.h>
 
 #include <trace/events/module.h>
 
-extern int max_threads;
-
 static struct workqueue_struct *khelper_wq;
 
 #ifdef CONFIG_MODULES
--- linux-2.6.32.orig/kernel/sysctl.c	2010-02-12 12:46:42.202820096 +0800
+++ linux-2.6.32/kernel/sysctl.c	2010-02-12 12:50:08.065301362 +0800
@@ -55,6 +55,7 @@
 #include <linux/perf_event.h>
 #include <linux/rcustring.h>
 #include <linux/signal.h>
+#include <linux/threads.h>
 
 #include <asm/uaccess.h>
 #include <asm/processor.h>
@@ -69,7 +70,6 @@
 #if defined(CONFIG_SYSCTL)
 
 /* External variables not in a header file. */
-extern int max_threads;
 extern int core_uses_pid;
 extern int suid_dumpable;
 extern char *core_pattern;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-02-20 14:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-20 14:09 [PATCH 03/18] sysctl extern cleanup - threads Dave Young

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox