From: Dave Young <hidave.darkstar@gmail.com>
To: Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Oleg Nesterov <oleg@redhat.com>,
Roland McGrath <roland@redhat.com>,
James Morris <jmorris@namei.org>,
Rusty Russell <rusty@rustcorp.com.au>,
Eric Paris <eparis@redhat.com>,
David Howells <dhowells@redhat.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 03/18] sysctl extern cleanup - threads
Date: Sat, 20 Feb 2010 22:09:05 +0800 [thread overview]
Message-ID: <20100220140905.GB3195@darkstar> (raw)
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;
reply other threads:[~2010-02-20 14:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20100220140905.GB3195@darkstar \
--to=hidave.darkstar@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=ebiederm@xmission.com \
--cc=eparis@redhat.com \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=oleg@redhat.com \
--cc=roland@redhat.com \
--cc=rusty@rustcorp.com.au \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox