diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-02 09:59:21 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-06-01 12:58:48 -0400 |
commit | b7f9a11a6cf1ea9ee6be3eb2b90d91327a09ad14 (patch) | |
tree | 7d5a5f469aea8ac2b3e1ab41e05a6abafcb2b694 /arch/c6x | |
parent | 51a7b448d4134e3e8eec633435e3e8faee14a828 (diff) | |
download | linux-b7f9a11a6cf1ea9ee6be3eb2b90d91327a09ad14.tar.bz2 |
new helper: sigmask_to_save()
replace boilerplate "should we use ->saved_sigmask or ->blocked?"
with calls of obvious inlined helper...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/c6x')
-rw-r--r-- | arch/c6x/kernel/signal.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/arch/c6x/kernel/signal.c b/arch/c6x/kernel/signal.c index bfbcc958bbb4..38bb501eb117 100644 --- a/arch/c6x/kernel/signal.c +++ b/arch/c6x/kernel/signal.c @@ -250,8 +250,7 @@ do_restart: */ static int handle_signal(int sig, siginfo_t *info, struct k_sigaction *ka, - sigset_t *oldset, struct pt_regs *regs, - int syscall) + struct pt_regs *regs, int syscall) { int ret; @@ -278,7 +277,7 @@ static int handle_signal(int sig, } /* Set up the stack frame */ - ret = setup_rt_frame(sig, ka, info, oldset, regs); + ret = setup_rt_frame(sig, ka, info, sigmask_to_save(), regs); if (ret == 0) block_sigmask(ka, sig); @@ -292,7 +291,6 @@ static void do_signal(struct pt_regs *regs, int syscall) { struct k_sigaction ka; siginfo_t info; - sigset_t *oldset; int signr; /* we want the common case to go fast, which is why we may in certain @@ -300,15 +298,9 @@ static void do_signal(struct pt_regs *regs, int syscall) if (!user_mode(regs)) return; - if (test_thread_flag(TIF_RESTORE_SIGMASK)) - oldset = ¤t->saved_sigmask; - else - oldset = ¤t->blocked; - signr = get_signal_to_deliver(&info, &ka, regs, NULL); if (signr > 0) { - if (handle_signal(signr, &info, &ka, oldset, - regs, syscall) == 0) { + if (handle_signal(signr, &info, &ka, regs, syscall) == 0) { /* a signal was successfully delivered; the saved * sigmask will have been stored in the signal frame, * and will be restored by sigreturn, so we can simply |