diff options
author | Oleg Nesterov <oleg@tv-sign.ru> | 2006-03-29 02:11:14 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-29 04:36:42 +0200 |
commit | a9e88e84b5245da0a1dadb6ccca70ae84e93ccf6 (patch) | |
tree | 2b155e7f5ce7ff14a986361fe81d77bf9039e95e | |
parent | [PATCH] introduce lock_task_sighand() helper (diff) | |
download | linux-a9e88e84b5245da0a1dadb6ccca70ae84e93ccf6.tar.xz linux-a9e88e84b5245da0a1dadb6ccca70ae84e93ccf6.zip |
[PATCH] introduce sig_needs_tasklist() helper
In my opinion this patch cleans up the code.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | kernel/signal.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index 819fa49aa70a..c5b65aa4c2bc 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -147,6 +147,9 @@ static kmem_cache_t *sigqueue_cachep; #define sig_kernel_stop(sig) \ (((sig) < SIGRTMIN) && T(sig, SIG_KERNEL_STOP_MASK)) +#define sig_needs_tasklist(sig) \ + (((sig) < SIGRTMIN) && T(sig, SIG_KERNEL_STOP_MASK | M(SIGCONT))) + #define sig_user_defined(t, signr) \ (((t)->sighand->action[(signr)-1].sa.sa_handler != SIG_DFL) && \ ((t)->sighand->action[(signr)-1].sa.sa_handler != SIG_IGN)) @@ -1199,7 +1202,7 @@ kill_proc_info(int sig, struct siginfo *info, pid_t pid) struct task_struct *p; rcu_read_lock(); - if (unlikely(sig_kernel_stop(sig) || sig == SIGCONT)) { + if (unlikely(sig_needs_tasklist(sig))) { read_lock(&tasklist_lock); acquired_tasklist_lock = 1; } |