diff options
author | Roland McGrath <roland@redhat.com> | 2006-09-29 02:00:31 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-29 09:18:15 -0700 |
commit | 27d91e07f9b863fa94491ffafe250580f0c2ce78 (patch) | |
tree | 0e5237670110b70496d68398e68a071c43c9e03e | |
parent | b9ecb2bd5d3ab8904752685696cb76aac1f3fef2 (diff) | |
download | op-kernel-dev-27d91e07f9b863fa94491ffafe250580f0c2ce78.zip op-kernel-dev-27d91e07f9b863fa94491ffafe250580f0c2ce78.tar.gz |
[PATCH] __dequeue_signal() cleanup
This tightens up __dequeue_signal a little. It also avoids doing
recalc_sigpending twice in a row, instead doing it once in dequeue_signal.
Signed-off-by: Roland McGrath <roland@redhat.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | kernel/signal.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index 05853a7..fb5da6d 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -417,9 +417,8 @@ static int collect_signal(int sig, struct sigpending *list, siginfo_t *info) static int __dequeue_signal(struct sigpending *pending, sigset_t *mask, siginfo_t *info) { - int sig = 0; + int sig = next_signal(pending, mask); - sig = next_signal(pending, mask); if (sig) { if (current->notifier) { if (sigismember(current->notifier_mask, sig)) { @@ -432,9 +431,7 @@ static int __dequeue_signal(struct sigpending *pending, sigset_t *mask, if (!collect_signal(sig, pending, info)) sig = 0; - } - recalc_sigpending(); return sig; } @@ -451,6 +448,7 @@ int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info) if (!signr) signr = __dequeue_signal(&tsk->signal->shared_pending, mask, info); + recalc_sigpending_tsk(tsk); if (signr && unlikely(sig_kernel_stop(signr))) { /* * Set a marker that we have dequeued a stop signal. Our |