This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / arch / sh / kernel / signal.c
index a758053..fc5ef99 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: signal.c,v 1.21 2004/06/28 13:18:44 doyu Exp $
+/* $Id: signal.c,v 1.20 2004/01/13 05:52:11 kkojima Exp $
  *
  *  linux/arch/sh/kernel/signal.c
  *
@@ -155,7 +155,7 @@ struct rt_sigframe
        u16 retcode[8];
 };
 
-#ifdef CONFIG_SH_FPU
+#ifdef CONFIG_CPU_SH4
 static inline int restore_sigcontext_fpu(struct sigcontext __user *sc)
 {
        struct task_struct *tsk = current;
@@ -192,7 +192,7 @@ static inline int save_sigcontext_fpu(struct sigcontext __user *sc,
        return __copy_to_user(&sc->sc_fpregs[0], &tsk->thread.fpu.hard,
                              sizeof(long)*(16*2+2));
 }
-#endif /* CONFIG_SH_FPU */
+#endif /* CONFIG_CPU_SH4 */
 
 static int
 restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, int *r0_p)
@@ -213,7 +213,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, int *r0_p
        COPY(sr);       COPY(pc);
 #undef COPY
 
-#ifdef CONFIG_SH_FPU
+#ifdef CONFIG_CPU_SH4
        if (cpu_data->flags & CPU_HAS_FPU) {
                int owned_fp;
                struct task_struct *tsk = current;
@@ -326,7 +326,7 @@ setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs,
        COPY(sr);       COPY(pc);
 #undef COPY
 
-#ifdef CONFIG_SH_FPU
+#ifdef CONFIG_CPU_SH4
        err |= save_sigcontext_fpu(sc, regs);
 #endif
 
@@ -493,12 +493,14 @@ give_sigsegv:
 
 /*
  * OK, we're invoking a handler
- */
+ */    
 
 static void
-handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
-             sigset_t *oldset, struct pt_regs *regs)
+handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset,
+       struct pt_regs * regs)
 {
+       struct k_sigaction *ka = &current->sighand->action[sig-1];
+
        /* Are we from a system call? */
        if (regs->tra >= 0) {
                /* If so, check system call restarting.. */
@@ -568,7 +570,6 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
 {
        siginfo_t info;
        int signr;
-       struct k_sigaction ka;
 
        /*
         * We want the common case to go fast, which
@@ -587,10 +588,10 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
        if (!oldset)
                oldset = &current->blocked;
 
-       signr = get_signal_to_deliver(&info, &ka, regs, NULL);
+       signr = get_signal_to_deliver(&info, regs, NULL);
        if (signr > 0) {
                /* Whee!  Actually deliver the signal.  */
-               handle_signal(signr, &ka, &info, oldset, regs);
+               handle_signal(signr, &info, oldset, regs);
                return 1;
        }