vserver 1.9.5.x5
[linux-2.6.git] / arch / sh64 / kernel / signal.c
index 376b899..608f679 100644 (file)
@@ -186,7 +186,7 @@ restore_sigcontext_fpu(struct pt_regs *regs, struct sigcontext __user *sc)
        int fpvalid;
 
        err |= __get_user (fpvalid, &sc->sc_fpvalid);
-       current->used_math = fpvalid;
+       conditional_used_math(fpvalid);
        if (! fpvalid)
                return err;
 
@@ -207,7 +207,7 @@ setup_sigcontext_fpu(struct pt_regs *regs, struct sigcontext __user *sc)
        int err = 0;
        int fpvalid;
 
-       fpvalid = current->used_math;
+       fpvalid = !!used_math();
        err |= __put_user(fpvalid, &sc->sc_fpvalid);
        if (! fpvalid)
                return err;
@@ -222,7 +222,7 @@ setup_sigcontext_fpu(struct pt_regs *regs, struct sigcontext __user *sc)
 
        err |= __copy_to_user(&sc->sc_fpregs[0], &current->thread.fpu.hard,
                              (sizeof(long long) * 32) + (sizeof(int) * 1));
-       current->used_math = 0;
+       clear_used_math();
 
        return err;
 }
@@ -520,9 +520,7 @@ static void setup_frame(int sig, struct k_sigaction *ka,
        return;
 
 give_sigsegv:
-       if (sig == SIGSEGV)
-               ka->sa.sa_handler = SIG_DFL;
-       force_sig(SIGSEGV, current);
+       force_sigsegv(sig, current);
 }
 
 static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
@@ -628,9 +626,7 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
        return;
 
 give_sigsegv:
-       if (sig == SIGSEGV)
-               ka->sa.sa_handler = SIG_DFL;
-       force_sig(SIGSEGV, current);
+       force_sigsegv(sig, current);
 }
 
 /*
@@ -705,10 +701,8 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
        if (!user_mode(regs))
                return 1;
 
-       if (current->flags & PF_FREEZE) {
-               refrigerator(0);
+       if (try_to_freeze(0))
                goto no_signal;
-               }
 
        if (!oldset)
                oldset = &current->blocked;