aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m32r
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/m32r
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/m32r')
-rw-r--r--arch/m32r/kernel/signal.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/arch/m32r/kernel/signal.c b/arch/m32r/kernel/signal.c
index 2ad7c4587669..e0d6d1079f33 100644
--- a/arch/m32r/kernel/signal.c
+++ b/arch/m32r/kernel/signal.c
@@ -269,7 +269,7 @@ static int prev_insn(struct pt_regs *regs)
269 269
270static int 270static int
271handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info, 271handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
272 sigset_t *oldset, struct pt_regs *regs) 272 struct pt_regs *regs)
273{ 273{
274 /* Are we from a system call? */ 274 /* Are we from a system call? */
275 if (regs->syscall_nr >= 0) { 275 if (regs->syscall_nr >= 0) {
@@ -294,7 +294,7 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
294 } 294 }
295 295
296 /* Set up the stack frame */ 296 /* Set up the stack frame */
297 if (setup_rt_frame(sig, ka, info, oldset, regs)) 297 if (setup_rt_frame(sig, ka, info, sigmask_to_save(), regs))
298 return -EFAULT; 298 return -EFAULT;
299 299
300 block_sigmask(ka, sig); 300 block_sigmask(ka, sig);
@@ -311,7 +311,6 @@ static void do_signal(struct pt_regs *regs)
311 siginfo_t info; 311 siginfo_t info;
312 int signr; 312 int signr;
313 struct k_sigaction ka; 313 struct k_sigaction ka;
314 sigset_t *oldset;
315 314
316 /* 315 /*
317 * We want the common case to go fast, which 316 * We want the common case to go fast, which
@@ -325,11 +324,6 @@ static void do_signal(struct pt_regs *regs)
325 if (try_to_freeze()) 324 if (try_to_freeze())
326 goto no_signal; 325 goto no_signal;
327 326
328 if (test_thread_flag(TIF_RESTORE_SIGMASK))
329 oldset = &current->saved_sigmask;
330 else
331 oldset = &current->blocked;
332
333 signr = get_signal_to_deliver(&info, &ka, regs, NULL); 327 signr = get_signal_to_deliver(&info, &ka, regs, NULL);
334 if (signr > 0) { 328 if (signr > 0) {
335 /* Re-enable any watchpoints before delivering the 329 /* Re-enable any watchpoints before delivering the
@@ -339,7 +333,7 @@ static void do_signal(struct pt_regs *regs)
339 */ 333 */
340 334
341 /* Whee! Actually deliver the signal. */ 335 /* Whee! Actually deliver the signal. */
342 if (handle_signal(signr, &ka, &info, oldset, regs) == 0) 336 if (handle_signal(signr, &ka, &info, regs) == 0)
343 clear_thread_flag(TIF_RESTORE_SIGMASK); 337 clear_thread_flag(TIF_RESTORE_SIGMASK);
344 338
345 return; 339 return;