Skip to contentSkip to conversation

pids: add pid_max prototype

PATCH In review Ingo Molnar 2 participants 2 messages Feb 10, 2008 Proc sysctl

lore
Share & tools
lore
#0 lore raw

PATCH 1/6 pids: add pid_max prototype

From: Ingo Molnar <[email protected]>

add pid_max prototype - used by sysctl and will be used by kgdb as well.

---
 include/linux/pid.h |    2 ++
 kernel/sysctl.c     |    2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
include/linux/pid.h +2 -0
Index: linux-kgdb.q/include/linux/pid.h
===================================================================
@@ -86,6 +86,8 @@ extern struct task_struct *FASTCALL(get_
 
 extern struct pid *get_task_pid(struct task_struct *task, enum pid_type type);
 
+extern int pid_max;
+
 /*
  * attach_pid() and detach_pid() must be called with the tasklist_lock
  * write-held.
kernel/sysctl.c +1 -1
Index: linux-kgdb.q/kernel/sysctl.c
===================================================================
@@ -32,6 +32,7 @@
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/kobject.h>
+#include <linux/pid.h>
 #include <linux/net.h>
 #include <linux/sysrq.h>
 #include <linux/highuid.h>
@@ -71,7 +72,6 @@ extern int max_threads;
 extern int core_uses_pid;
 extern int suid_dumpable;
 extern char core_pattern[];
-extern int pid_max;
 extern int min_free_kbytes;
 extern int pid_max_min, pid_max_max;
 extern int sysctl_drop_caches;
#1 lore raw
Quoted 3 lines · Ingo Molnar

From: Ingo Molnar <[email protected]>

add pid_max prototype - used by sysctl and will be used by kgdb as well.

Looks good, and this should go in ASAP independent of kgdb.

And while you're at it, I think all of the below want to find a suitable place in a header somewhere:

Quoted 8 lines
kernel/sysctl.c +0 -1
@@ -71,7 +72,6 @@ extern int max_threads;
 extern int core_uses_pid;
 extern int suid_dumpable;
 extern char core_pattern[];
-extern int pid_max;
 extern int min_free_kbytes;
 extern int pid_max_min, pid_max_max;
 extern int sysctl_drop_caches;