diff options
author | David S. Miller <davem@davemloft.net> | 2008-05-13 01:45:15 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-05-13 01:45:15 -0400 |
commit | 9a28dbf8af11d127bf1c644143e7882cb91515dd (patch) | |
tree | 533dfbec4fca25330956d54094cae3dbd6a8d675 /arch/sparc64/kernel/signal32.c | |
parent | faa6cfde747ba6d37a0889cbe85881c80806d355 (diff) |
sparc64: Use a TS_RESTORE_SIGMASK
This mirrors x86 changeset 5a8da0ea82db6fa9737041381079fd16f25dcce2
("signals: x86 TS_RESTORE_SIGMASK") on sparc64.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/signal32.c')
-rw-r--r-- | arch/sparc64/kernel/signal32.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/sparc64/kernel/signal32.c b/arch/sparc64/kernel/signal32.c index 3f19e9af3d1b..97cdd1bf4a10 100644 --- a/arch/sparc64/kernel/signal32.c +++ b/arch/sparc64/kernel/signal32.c | |||
@@ -788,13 +788,12 @@ void do_signal32(sigset_t *oldset, struct pt_regs * regs, | |||
788 | syscall_restart32(orig_i0, regs, &ka.sa); | 788 | syscall_restart32(orig_i0, regs, &ka.sa); |
789 | handle_signal32(signr, &ka, &info, oldset, regs); | 789 | handle_signal32(signr, &ka, &info, oldset, regs); |
790 | 790 | ||
791 | /* a signal was successfully delivered; the saved | 791 | /* A signal was successfully delivered; the saved |
792 | * sigmask will have been stored in the signal frame, | 792 | * sigmask will have been stored in the signal frame, |
793 | * and will be restored by sigreturn, so we can simply | 793 | * and will be restored by sigreturn, so we can simply |
794 | * clear the TIF_RESTORE_SIGMASK flag. | 794 | * clear the TS_RESTORE_SIGMASK flag. |
795 | */ | 795 | */ |
796 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | 796 | current_thread_info()->status &= ~TS_RESTORE_SIGMASK; |
797 | clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
798 | return; | 797 | return; |
799 | } | 798 | } |
800 | if (restart_syscall && | 799 | if (restart_syscall && |
@@ -813,11 +812,11 @@ void do_signal32(sigset_t *oldset, struct pt_regs * regs, | |||
813 | regs->tnpc -= 4; | 812 | regs->tnpc -= 4; |
814 | } | 813 | } |
815 | 814 | ||
816 | /* if there's no signal to deliver, we just put the saved sigmask | 815 | /* If there's no signal to deliver, we just put the saved sigmask |
817 | * back | 816 | * back |
818 | */ | 817 | */ |
819 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) { | 818 | if (current_thread_info()->status & TS_RESTORE_SIGMASK) { |
820 | clear_thread_flag(TIF_RESTORE_SIGMASK); | 819 | current_thread_info()->status &= ~TS_RESTORE_SIGMASK; |
821 | sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL); | 820 | sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL); |
822 | } | 821 | } |
823 | } | 822 | } |