diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2011-08-27 09:43:54 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2011-08-27 10:06:11 -0400 |
commit | 7b1bb388bc879ffcc6c69b567816d5c354afe42b (patch) | |
tree | 5a217fdfb0b5e5a327bdcd624506337c1ae1fe32 /include/linux/pid.h | |
parent | 7d754596756240fa918b94cd0c3011c77a638987 (diff) | |
parent | 02f8c6aee8df3cdc935e9bdd4f2d020306035dbe (diff) |
Merge 'Linux v3.0' into Litmus
Some notes:
* Litmus^RT scheduling class is the topmost scheduling class
(above stop_sched_class).
* scheduler_ipi() function (e.g., in smp_reschedule_interrupt())
may increase IPI latencies.
* Added path into schedule() to quickly re-evaluate scheduling
decision without becoming preemptive again. This used to be
a standard path before the removal of BKL.
Conflicts:
Makefile
arch/arm/kernel/calls.S
arch/arm/kernel/smp.c
arch/x86/include/asm/unistd_32.h
arch/x86/kernel/smp.c
arch/x86/kernel/syscall_table_32.S
include/linux/hrtimer.h
kernel/printk.c
kernel/sched.c
kernel/sched_fair.c
Diffstat (limited to 'include/linux/pid.h')
-rw-r--r-- | include/linux/pid.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/include/linux/pid.h b/include/linux/pid.h index 49f1c2f66e95..b152d44fb181 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h | |||
@@ -21,7 +21,7 @@ enum pid_type | |||
21 | * quickly from the numeric pid value. The attached processes may be | 21 | * quickly from the numeric pid value. The attached processes may be |
22 | * quickly accessed by following pointers from struct pid. | 22 | * quickly accessed by following pointers from struct pid. |
23 | * | 23 | * |
24 | * Storing pid_t values in the kernel and refering to them later has a | 24 | * Storing pid_t values in the kernel and referring to them later has a |
25 | * problem. The process originally with that pid may have exited and the | 25 | * problem. The process originally with that pid may have exited and the |
26 | * pid allocator wrapped, and another process could have come along | 26 | * pid allocator wrapped, and another process could have come along |
27 | * and been assigned that pid. | 27 | * and been assigned that pid. |
@@ -105,7 +105,7 @@ extern struct pid_namespace init_pid_ns; | |||
105 | * or rcu_read_lock() held. | 105 | * or rcu_read_lock() held. |
106 | * | 106 | * |
107 | * find_pid_ns() finds the pid in the namespace specified | 107 | * find_pid_ns() finds the pid in the namespace specified |
108 | * find_vpid() finr the pid by its virtual id, i.e. in the current namespace | 108 | * find_vpid() finds the pid by its virtual id, i.e. in the current namespace |
109 | * | 109 | * |
110 | * see also find_task_by_vpid() set in include/linux/sched.h | 110 | * see also find_task_by_vpid() set in include/linux/sched.h |
111 | */ | 111 | */ |
@@ -117,7 +117,7 @@ extern struct pid *find_vpid(int nr); | |||
117 | */ | 117 | */ |
118 | extern struct pid *find_get_pid(int nr); | 118 | extern struct pid *find_get_pid(int nr); |
119 | extern struct pid *find_ge_pid(int nr, struct pid_namespace *); | 119 | extern struct pid *find_ge_pid(int nr, struct pid_namespace *); |
120 | int next_pidmap(struct pid_namespace *pid_ns, int last); | 120 | int next_pidmap(struct pid_namespace *pid_ns, unsigned int last); |
121 | 121 | ||
122 | extern struct pid *alloc_pid(struct pid_namespace *ns); | 122 | extern struct pid *alloc_pid(struct pid_namespace *ns); |
123 | extern void free_pid(struct pid *pid); | 123 | extern void free_pid(struct pid *pid); |
@@ -141,6 +141,17 @@ static inline struct pid_namespace *ns_of_pid(struct pid *pid) | |||
141 | } | 141 | } |
142 | 142 | ||
143 | /* | 143 | /* |
144 | * is_child_reaper returns true if the pid is the init process | ||
145 | * of the current namespace. As this one could be checked before | ||
146 | * pid_ns->child_reaper is assigned in copy_process, we check | ||
147 | * with the pid number. | ||
148 | */ | ||
149 | static inline bool is_child_reaper(struct pid *pid) | ||
150 | { | ||
151 | return pid->numbers[pid->level].nr == 1; | ||
152 | } | ||
153 | |||
154 | /* | ||
144 | * the helpers to get the pid's id seen from different namespaces | 155 | * the helpers to get the pid's id seen from different namespaces |
145 | * | 156 | * |
146 | * pid_nr() : global id, i.e. the id seen from the init namespace; | 157 | * pid_nr() : global id, i.e. the id seen from the init namespace; |