sysctl extern cleanup - pid
PATCH 5/18 sysctl extern cleanup - pid
Extern declarations in sysctl.c should be move to their own head file, and then include them in relavant .c files.
Move pid/pid_max_min/pid_max_max extern declarations to linux/pid.h
Signed-off-by Dave Young <[email protected]>
--- include/linux/pid.h | 5 +++++ kernel/sysctl.c | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-)
include/linux/pid.h +5 -0
@@ -3,6 +3,11 @@#include <linux/rcupdate.h> +#ifdef CONFIG_SYSCTL +extern int pid_max; +extern int pid_max_min, pid_max_max; +#endif +enum pid_type {PIDTYPE_PID ,
kernel/sysctl.c +1 -2
@@ -57,6 +57,7 @@#include <linux/signal.h> #include <linux/threads.h> #include <linux/binfmts.h> +#include <linux/pid.h> #include <asm/uaccess.h> #include <asm/processor.h>
@@ -71,9 +72,7 @@#if defined(CONFIG_SYSCTL )/* External variables not in a header file. */ -extern int pid_max;extern int min_free_kbytes; -extern int pid_max_min, pid_max_max;extern int compat_log;extern int latencytop_enabled;extern int sysctl_nr_open_min, sysctl_nr_open_max;