summaryrefslogtreecommitdiffstats
path: root/arch/frv/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/frv/kernel
parent51a7b448d4134e3e8eec633435e3e8faee14a828 (diff)
downloadop-kernel-dev-b7f9a11a6cf1ea9ee6be3eb2b90d91327a09ad14.zip
op-kernel-dev-b7f9a11a6cf1ea9ee6be3eb2b90d91327a09ad14.tar.gz
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/frv/kernel')
-rw-r--r--arch/frv/kernel/signal.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/frv/kernel/signal.c b/arch/frv/kernel/signal.c
index 16351cc..22efe8d 100644
--- a/arch/frv/kernel/signal.c
+++ b/arch/frv/kernel/signal.c
@@ -427,8 +427,9 @@ give_sigsegv:
* OK, we're invoking a handler
*/
static int handle_signal(unsigned long sig, siginfo_t *info,
- struct k_sigaction *ka, sigset_t *oldset)
+ struct k_sigaction *ka)
{
+ sigset_t *oldset = sigmask_to_save();
int ret;
/* Are we from a system call? */
@@ -492,14 +493,9 @@ static void do_signal(void)
if (try_to_freeze())
goto no_signal;
- if (test_thread_flag(TIF_RESTORE_SIGMASK))
- oldset = &current->saved_sigmask;
- else
- oldset = &current->blocked;
-
signr = get_signal_to_deliver(&info, &ka, __frame, NULL);
if (signr > 0) {
- if (handle_signal(signr, &info, &ka, oldset) == 0) {
+ if (handle_signal(signr, &info, &ka) == 0) {
/* a signal was successfully delivered; the saved
* sigmask will have been stored in the signal frame,
* and will be restored by sigreturn, so we can simply
OpenPOWER on IntegriCloud