提交 86174cdc 编写于 作者: O Oleg Nesterov 提交者: Linus Torvalds

[PATCH] remove unneeded sig->curr_target recalculation

This patch removes unneeded sig->curr_target recalculation under 'if
(atomic_dec_and_test(&sig->count))' in __exit_signal().

When sig->count == 0 the signal can't be sent to this task and
next_thread(tsk) == tsk anyway.
Signed-off-by: NOleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 08efd10e
...@@ -364,8 +364,6 @@ void __exit_signal(struct task_struct *tsk) ...@@ -364,8 +364,6 @@ void __exit_signal(struct task_struct *tsk)
posix_cpu_timers_exit(tsk); posix_cpu_timers_exit(tsk);
if (atomic_dec_and_test(&sig->count)) { if (atomic_dec_and_test(&sig->count)) {
posix_cpu_timers_exit_group(tsk); posix_cpu_timers_exit_group(tsk);
if (tsk == sig->curr_target)
sig->curr_target = next_thread(tsk);
tsk->signal = NULL; tsk->signal = NULL;
__exit_sighand(tsk); __exit_sighand(tsk);
spin_unlock(&sighand->siglock); spin_unlock(&sighand->siglock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册