aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@us.ibm.com>2005-10-30 18:03:46 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-30 20:37:32 -0500
commitb0423a0d9cc836b2c3d796623cd19236bfedfe63 (patch)
tree21c6ebdc052b4e085aacb295b55c168bc60bcae2
parentae6866c377943de73e2c95398ff0120516f167ce (diff)
[PATCH] Remove duplicate code in signal.c
Combine a bit of redundant code between force_sig_info() and force_sig_specific(). Signed-off-by: paulmck@us.ibm.com Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--kernel/signal.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index 1d8f84c5c6ee..1bf3c39d6109 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -879,11 +879,13 @@ force_sig_info(int sig, struct siginfo *info, struct task_struct *t)
879 int ret; 879 int ret;
880 880
881 spin_lock_irqsave(&t->sighand->siglock, flags); 881 spin_lock_irqsave(&t->sighand->siglock, flags);
882 if (sigismember(&t->blocked, sig) || t->sighand->action[sig-1].sa.sa_handler == SIG_IGN) { 882 if (t->sighand->action[sig-1].sa.sa_handler == SIG_IGN) {
883 t->sighand->action[sig-1].sa.sa_handler = SIG_DFL; 883 t->sighand->action[sig-1].sa.sa_handler = SIG_DFL;
884 }
885 if (sigismember(&t->blocked, sig)) {
884 sigdelset(&t->blocked, sig); 886 sigdelset(&t->blocked, sig);
885 recalc_sigpending_tsk(t);
886 } 887 }
888 recalc_sigpending_tsk(t);
887 ret = specific_send_sig_info(sig, info, t); 889 ret = specific_send_sig_info(sig, info, t);
888 spin_unlock_irqrestore(&t->sighand->siglock, flags); 890 spin_unlock_irqrestore(&t->sighand->siglock, flags);
889 891
@@ -893,15 +895,7 @@ force_sig_info(int sig, struct siginfo *info, struct task_struct *t)
893void 895void
894force_sig_specific(int sig, struct task_struct *t) 896force_sig_specific(int sig, struct task_struct *t)
895{ 897{
896 unsigned long int flags; 898 force_sig_info(sig, SEND_SIG_FORCED, t);
897
898 spin_lock_irqsave(&t->sighand->siglock, flags);
899 if (t->sighand->action[sig-1].sa.sa_handler == SIG_IGN)
900 t->sighand->action[sig-1].sa.sa_handler = SIG_DFL;
901 sigdelset(&t->blocked, sig);
902 recalc_sigpending_tsk(t);
903 specific_send_sig_info(sig, SEND_SIG_FORCED, t);
904 spin_unlock_irqrestore(&t->sighand->siglock, flags);
905} 899}
906 900
907/* 901/*