-/* $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
*
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;
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)
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;
COPY(sr); COPY(pc);
#undef COPY
-#ifdef CONFIG_SH_FPU
+#ifdef CONFIG_CPU_SH4
err |= save_sigcontext_fpu(sc, regs);
#endif
/*
* 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 = ¤t->sighand->action[sig-1];
+
/* Are we from a system call? */
if (regs->tra >= 0) {
/* If so, check system call restarting.. */
{
siginfo_t info;
int signr;
- struct k_sigaction ka;
/*
* We want the common case to go fast, which
if (!oldset)
oldset = ¤t->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;
}