diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-02 17:59:21 +0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-06-01 20:58:48 +0400 |
commit | b7f9a11a6cf1ea9ee6be3eb2b90d91327a09ad14 (patch) | |
tree | 7d5a5f469aea8ac2b3e1ab41e05a6abafcb2b694 /arch/hexagon | |
parent | 51a7b448d4134e3e8eec633435e3e8faee14a828 (diff) | |
download | linux-b7f9a11a6cf1ea9ee6be3eb2b90d91327a09ad14.tar.xz |
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/hexagon')
-rw-r--r-- | arch/hexagon/kernel/signal.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/arch/hexagon/kernel/signal.c b/arch/hexagon/kernel/signal.c index acd6272913b3..f73fcee09bac 100644 --- a/arch/hexagon/kernel/signal.c +++ b/arch/hexagon/kernel/signal.c @@ -150,7 +150,7 @@ sigsegv: * Setup invocation of signal handler */ static int handle_signal(int sig, siginfo_t *info, struct k_sigaction *ka, - sigset_t *oldset, struct pt_regs *regs) + struct pt_regs *regs) { int rc; @@ -186,7 +186,7 @@ static int handle_signal(int sig, siginfo_t *info, struct k_sigaction *ka, * Set up the stack frame; not doing the SA_SIGINFO thing. We * only set up the rt_frame flavor. */ - rc = setup_rt_frame(sig, ka, info, oldset, regs); + rc = setup_rt_frame(sig, ka, info, sigmask_to_save(), regs); /* If there was an error on setup, no signal was delivered. */ if (rc) @@ -215,14 +215,7 @@ static void do_signal(struct pt_regs *regs) signo = get_signal_to_deliver(&info, &sigact, regs, NULL); if (signo > 0) { - sigset_t *oldset; - - if (test_thread_flag(TIF_RESTORE_SIGMASK)) - oldset = ¤t->saved_sigmask; - else - oldset = ¤t->blocked; - - if (handle_signal(signo, &info, &sigact, oldset, regs) == 0) { + if (handle_signal(signo, &info, &sigact, regs) == 0) { /* * Successful delivery case. The saved sigmask is * stored in the signal frame, and will be restored |