summaryrefslogtreecommitdiff
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2008-04-30 07:52:52 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-30 15:29:35 (GMT)
commitdb51aeccd7097ce19a522a4c5ff91c320f870e2b (patch)
tree373bdfb55d1d90c04d53d4a419bcd156fe7f054c /kernel/fork.c
parent08d2c30ce98d274137f12b0a9b9c74137455922c (diff)
downloadlinux-db51aeccd7097ce19a522a4c5ff91c320f870e2b.tar.xz
signals: microoptimize the usage of ->curr_target
Suggested by Roland McGrath. Initialize signal->curr_target in copy_signal(). This way ->curr_target is never == NULL, we can kill the check in __group_complete_signal's hot path. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Cc: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 068ffe0..2bb675a 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -892,7 +892,7 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk)
sig->group_exit_code = 0;
sig->group_exit_task = NULL;
sig->group_stop_count = 0;
- sig->curr_target = NULL;
+ sig->curr_target = tsk;
init_sigpending(&sig->shared_pending);
INIT_LIST_HEAD(&sig->posix_timers);