aboutsummaryrefslogtreecommitdiffstats
path: root/arch/hexagon
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-05-02 09:59:21 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-06-01 12:58:48 -0400
commitb7f9a11a6cf1ea9ee6be3eb2b90d91327a09ad14 (patch)
tree7d5a5f469aea8ac2b3e1ab41e05a6abafcb2b694 /arch/hexagon
parent51a7b448d4134e3e8eec633435e3e8faee14a828 (diff)
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.c13
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:
150 * Setup invocation of signal handler 150 * Setup invocation of signal handler
151 */ 151 */
152static int handle_signal(int sig, siginfo_t *info, struct k_sigaction *ka, 152static int handle_signal(int sig, siginfo_t *info, struct k_sigaction *ka,
153 sigset_t *oldset, struct pt_regs *regs) 153 struct pt_regs *regs)
154{ 154{
155 int rc; 155 int rc;
156 156
@@ -186,7 +186,7 @@ static int handle_signal(int sig, siginfo_t *info, struct k_sigaction *ka,
186 * Set up the stack frame; not doing the SA_SIGINFO thing. We 186 * Set up the stack frame; not doing the SA_SIGINFO thing. We
187 * only set up the rt_frame flavor. 187 * only set up the rt_frame flavor.
188 */ 188 */
189 rc = setup_rt_frame(sig, ka, info, oldset, regs); 189 rc = setup_rt_frame(sig, ka, info, sigmask_to_save(), regs);
190 190
191 /* If there was an error on setup, no signal was delivered. */ 191 /* If there was an error on setup, no signal was delivered. */
192 if (rc) 192 if (rc)
@@ -215,14 +215,7 @@ static void do_signal(struct pt_regs *regs)
215 signo = get_signal_to_deliver(&info, &sigact, regs, NULL); 215 signo = get_signal_to_deliver(&info, &sigact, regs, NULL);
216 216
217 if (signo > 0) { 217 if (signo > 0) {
218 sigset_t *oldset; 218 if (handle_signal(signo, &info, &sigact, regs) == 0) {
219
220 if (test_thread_flag(TIF_RESTORE_SIGMASK))
221 oldset = &current->saved_sigmask;
222 else
223 oldset = &current->blocked;
224
225 if (handle_signal(signo, &info, &sigact, oldset, regs) == 0) {
226 /* 219 /*
227 * Successful delivery case. The saved sigmask is 220 * Successful delivery case. The saved sigmask is
228 * stored in the signal frame, and will be restored 221 * stored in the signal frame, and will be restored