aboutsummaryrefslogtreecommitdiff
path: root/arch/avr32/kernel
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/avr32/kernel
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/avr32/kernel')
-rw-r--r--arch/avr32/kernel/signal.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/arch/avr32/kernel/signal.c b/arch/avr32/kernel/signal.c
index 8b12c304613..0e2c0527c9f 100644
--- a/arch/avr32/kernel/signal.c
+++ b/arch/avr32/kernel/signal.c
@@ -224,14 +224,14 @@ static inline void setup_syscall_restart(struct pt_regs *regs)
static inline void
handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
- sigset_t *oldset, struct pt_regs *regs, int syscall)
+ struct pt_regs *regs, int syscall)
{
int ret;
/*
* Set up the stack frame
*/
- ret = setup_rt_frame(sig, ka, info, oldset, regs);
+ ret = setup_rt_frame(sig, ka, info, sigmask_to_save(), regs);
/*
* Check that the resulting registers are sane
@@ -255,7 +255,7 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
* doesn't want to handle. Thus you cannot kill init even with a
* SIGKILL even by mistake.
*/
-int do_signal(struct pt_regs *regs, sigset_t *oldset, int syscall)
+static void do_signal(struct pt_regs *regs, int syscall)
{
siginfo_t info;
int signr;
@@ -267,12 +267,7 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset, int syscall)
* without doing anything if so.
*/
if (!user_mode(regs))
- return 0;
-
- if (test_thread_flag(TIF_RESTORE_SIGMASK))
- oldset = &current->saved_sigmask;
- else if (!oldset)
- oldset = &current->blocked;
+ return;
signr = get_signal_to_deliver(&info, &ka, regs, NULL);
if (syscall) {
@@ -298,11 +293,10 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset, int syscall)
if (signr == 0) {
/* No signal to deliver -- put the saved sigmask back */
restore_saved_sigmask();
- return 0;
+ return;
}
- handle_signal(signr, &ka, &info, oldset, regs, syscall);
- return 1;
+ handle_signal(signr, &ka, &info, regs, syscall);
}
asmlinkage void do_notify_resume(struct pt_regs *regs, struct thread_info *ti)
@@ -313,7 +307,7 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, struct thread_info *ti)
syscall = 1;
if (ti->flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK))
- do_signal(regs, &current->blocked, syscall);
+ do_signal(regs, syscall);
if (ti->flags & _TIF_NOTIFY_RESUME) {
clear_thread_flag(TIF_NOTIFY_RESUME);