aboutsummaryrefslogtreecommitdiff
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2007-10-18 23:40:16 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-19 11:53:40 -0700
commit228ebcbe634a30aec35132ea4375721bcc41bec0 (patch)
treea875976fd5bde6e2f931aa235c34c88a2738493f /include/linux/sched.h
parentb488893a390edfe027bae7a46e9af8083e740668 (diff)
Uninline find_task_by_xxx set of functions
The find_task_by_something is a set of macros are used to find task by pid depending on what kind of pid is proposed - global or virtual one. All of them are wrappers above the most generic one - find_task_by_pid_type_ns() - and just substitute some args for it. It turned out, that dereferencing the current->nsproxy->pid_ns construction and pushing one more argument on the stack inline cause kernel text size to grow. This patch moves all this stuff out-of-line into kernel/pid.c. Together with the next patch it saves a bit less than 400 bytes from the .text section. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Cc: Sukadev Bhattiprolu <sukadev@us.ibm.com> Cc: Oleg Nesterov <oleg@tv-sign.ru> Cc: Paul Menage <menage@google.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 1301c087537..f4d969e8561 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1523,9 +1523,8 @@ extern struct pid_namespace init_pid_ns;
* type and namespace specified
* find_task_by_pid_ns():
* finds a task by its pid in the specified namespace
- * find_task_by_pid_type():
- * finds a task by its global id with the specified type, e.g.
- * by global session id
+ * find_task_by_vpid():
+ * finds a task by its virtual pid
* find_task_by_pid():
* finds a task by its global pid
*
@@ -1535,12 +1534,10 @@ extern struct pid_namespace init_pid_ns;
extern struct task_struct *find_task_by_pid_type_ns(int type, int pid,
struct pid_namespace *ns);
-#define find_task_by_pid_ns(nr, ns) \
- find_task_by_pid_type_ns(PIDTYPE_PID, nr, ns)
-#define find_task_by_pid_type(type, nr) \
- find_task_by_pid_type_ns(type, nr, &init_pid_ns)
-#define find_task_by_pid(nr) \
- find_task_by_pid_type(PIDTYPE_PID, nr)
+extern struct task_struct *find_task_by_pid(pid_t nr);
+extern struct task_struct *find_task_by_vpid(pid_t nr);
+extern struct task_struct *find_task_by_pid_ns(pid_t nr,
+ struct pid_namespace *ns);
extern void __set_special_pids(pid_t session, pid_t pgrp);