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) |
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: | |||
250 | */ | 250 | */ |
251 | static int handle_signal(int sig, | 251 | static int handle_signal(int sig, |
252 | siginfo_t *info, struct k_sigaction *ka, | 252 | siginfo_t *info, struct k_sigaction *ka, |
253 | sigset_t *oldset, struct pt_regs *regs, | 253 | struct pt_regs *regs, int syscall) |
254 | int syscall) | ||
255 | { | 254 | { |
256 | int ret; | 255 | int ret; |
257 | 256 | ||
@@ -278,7 +277,7 @@ static int handle_signal(int sig, | |||
278 | } | 277 | } |
279 | 278 | ||
280 | /* Set up the stack frame */ | 279 | /* Set up the stack frame */ |
281 | ret = setup_rt_frame(sig, ka, info, oldset, regs); | 280 | ret = setup_rt_frame(sig, ka, info, sigmask_to_save(), regs); |
282 | if (ret == 0) | 281 | if (ret == 0) |
283 | block_sigmask(ka, sig); | 282 | block_sigmask(ka, sig); |
284 | 283 | ||
@@ -292,7 +291,6 @@ static void do_signal(struct pt_regs *regs, int syscall) | |||
292 | { | 291 | { |
293 | struct k_sigaction ka; | 292 | struct k_sigaction ka; |
294 | siginfo_t info; | 293 | siginfo_t info; |
295 | sigset_t *oldset; | ||
296 | int signr; | 294 | int signr; |
297 | 295 | ||
298 | /* we want the common case to go fast, which is why we may in certain | 296 | /* 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) | |||
300 | if (!user_mode(regs)) | 298 | if (!user_mode(regs)) |
301 | return; | 299 | return; |
302 | 300 | ||
303 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | ||
304 | oldset = ¤t->saved_sigmask; | ||
305 | else | ||
306 | oldset = ¤t->blocked; | ||
307 | |||
308 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); | 301 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); |
309 | if (signr > 0) { | 302 | if (signr > 0) { |
310 | if (handle_signal(signr, &info, &ka, oldset, | 303 | if (handle_signal(signr, &info, &ka, regs, syscall) == 0) { |
311 | regs, syscall) == 0) { | ||
312 | /* a signal was successfully delivered; the saved | 304 | /* a signal was successfully delivered; the saved |
313 | * sigmask will have been stored in the signal frame, | 305 | * sigmask will have been stored in the signal frame, |
314 | * and will be restored by sigreturn, so we can simply | 306 | * and will be restored by sigreturn, so we can simply |