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/tile | |
parent | 51a7b448d4134e3e8eec633435e3e8faee14a828 (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/tile')
-rw-r--r-- | arch/tile/kernel/signal.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/tile/kernel/signal.c b/arch/tile/kernel/signal.c index 62b3493ea77d..588c28b2db58 100644 --- a/arch/tile/kernel/signal.c +++ b/arch/tile/kernel/signal.c | |||
@@ -243,9 +243,10 @@ give_sigsegv: | |||
243 | */ | 243 | */ |
244 | 244 | ||
245 | static int handle_signal(unsigned long sig, siginfo_t *info, | 245 | static int handle_signal(unsigned long sig, siginfo_t *info, |
246 | struct k_sigaction *ka, sigset_t *oldset, | 246 | struct k_sigaction *ka, |
247 | struct pt_regs *regs) | 247 | struct pt_regs *regs) |
248 | { | 248 | { |
249 | sigset_t *oldset = sigmask_to_save(); | ||
249 | int ret; | 250 | int ret; |
250 | 251 | ||
251 | /* Are we from a system call? */ | 252 | /* Are we from a system call? */ |
@@ -299,7 +300,6 @@ void do_signal(struct pt_regs *regs) | |||
299 | siginfo_t info; | 300 | siginfo_t info; |
300 | int signr; | 301 | int signr; |
301 | struct k_sigaction ka; | 302 | struct k_sigaction ka; |
302 | sigset_t *oldset; | ||
303 | 303 | ||
304 | /* | 304 | /* |
305 | * i386 will check if we're coming from kernel mode and bail out | 305 | * i386 will check if we're coming from kernel mode and bail out |
@@ -308,15 +308,10 @@ void do_signal(struct pt_regs *regs) | |||
308 | * helpful, we can reinstate the check on "!user_mode(regs)". | 308 | * helpful, we can reinstate the check on "!user_mode(regs)". |
309 | */ | 309 | */ |
310 | 310 | ||
311 | if (current_thread_info()->status & TS_RESTORE_SIGMASK) | ||
312 | oldset = ¤t->saved_sigmask; | ||
313 | else | ||
314 | oldset = ¤t->blocked; | ||
315 | |||
316 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); | 311 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); |
317 | if (signr > 0) { | 312 | if (signr > 0) { |
318 | /* Whee! Actually deliver the signal. */ | 313 | /* Whee! Actually deliver the signal. */ |
319 | if (handle_signal(signr, &info, &ka, oldset, regs) == 0) { | 314 | if (handle_signal(signr, &info, &ka, regs) == 0) { |
320 | /* | 315 | /* |
321 | * A signal was successfully delivered; the saved | 316 | * A signal was successfully delivered; the saved |
322 | * sigmask will have been stored in the signal frame, | 317 | * sigmask will have been stored in the signal frame, |