aboutsummaryrefslogtreecommitdiffstats
path: root/arch/openrisc
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/openrisc
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/openrisc')
-rw-r--r--arch/openrisc/kernel/signal.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/arch/openrisc/kernel/signal.c b/arch/openrisc/kernel/signal.c
index 266c6fd2eb5c..721c584ff44a 100644
--- a/arch/openrisc/kernel/signal.c
+++ b/arch/openrisc/kernel/signal.c
@@ -254,11 +254,11 @@ give_sigsegv:
254static inline int 254static inline int
255handle_signal(unsigned long sig, 255handle_signal(unsigned long sig,
256 siginfo_t *info, struct k_sigaction *ka, 256 siginfo_t *info, struct k_sigaction *ka,
257 sigset_t *oldset, struct pt_regs *regs) 257 struct pt_regs *regs)
258{ 258{
259 int ret; 259 int ret;
260 260
261 ret = setup_rt_frame(sig, ka, info, oldset, regs); 261 ret = setup_rt_frame(sig, ka, info, sigmask_to_save(), regs);
262 if (ret) 262 if (ret)
263 return ret; 263 return ret;
264 264
@@ -341,15 +341,9 @@ void do_signal(struct pt_regs *regs)
341 * back */ 341 * back */
342 restore_saved_sigmask(); 342 restore_saved_sigmask();
343 } else { /* signr > 0 */ 343 } else { /* signr > 0 */
344 sigset_t *oldset;
345
346 if (current_thread_info()->flags & _TIF_RESTORE_SIGMASK)
347 oldset = &current->saved_sigmask;
348 else
349 oldset = &current->blocked;
350 344
351 /* Whee! Actually deliver the signal. */ 345 /* Whee! Actually deliver the signal. */
352 if (!handle_signal(signr, &info, &ka, oldset, regs)) { 346 if (!handle_signal(signr, &info, &ka, regs)) {
353 /* a signal was successfully delivered; the saved 347 /* a signal was successfully delivered; the saved
354 * sigmask will have been stored in the signal frame, 348 * sigmask will have been stored in the signal frame,
355 * and will be restored by sigreturn, so we can simply 349 * and will be restored by sigreturn, so we can simply