diff options
Diffstat (limited to 'kernel/pid.c')
-rw-r--r-- | kernel/pid.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/pid.c b/kernel/pid.c index 93e212f20671..6db82b68e2f8 100644 --- a/kernel/pid.c +++ b/kernel/pid.c | |||
@@ -252,6 +252,15 @@ void fastcall detach_pid(struct task_struct *task, enum pid_type type) | |||
252 | free_pid(pid); | 252 | free_pid(pid); |
253 | } | 253 | } |
254 | 254 | ||
255 | /* transfer_pid is an optimization of attach_pid(new), detach_pid(old) */ | ||
256 | void fastcall transfer_pid(struct task_struct *old, struct task_struct *new, | ||
257 | enum pid_type type) | ||
258 | { | ||
259 | new->pids[type].pid = old->pids[type].pid; | ||
260 | hlist_replace_rcu(&old->pids[type].node, &new->pids[type].node); | ||
261 | old->pids[type].pid = NULL; | ||
262 | } | ||
263 | |||
255 | struct task_struct * fastcall pid_task(struct pid *pid, enum pid_type type) | 264 | struct task_struct * fastcall pid_task(struct pid *pid, enum pid_type type) |
256 | { | 265 | { |
257 | struct task_struct *result = NULL; | 266 | struct task_struct *result = NULL; |