diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/alpha/alpha/trap.c | 2 | ||||
-rw-r--r-- | sys/amd64/amd64/machdep.c | 12 | ||||
-rw-r--r-- | sys/i386/i386/machdep.c | 12 | ||||
-rw-r--r-- | sys/i386/linux/linux_sysvec.c | 4 | ||||
-rw-r--r-- | sys/ia64/ia64/trap.c | 4 | ||||
-rw-r--r-- | sys/kern/kern_sig.c | 12 | ||||
-rw-r--r-- | sys/kern/subr_trap.c | 2 | ||||
-rw-r--r-- | sys/pc98/i386/machdep.c | 12 | ||||
-rw-r--r-- | sys/pc98/pc98/machdep.c | 12 | ||||
-rw-r--r-- | sys/powerpc/aim/trap.c | 2 | ||||
-rw-r--r-- | sys/powerpc/powerpc/trap.c | 2 | ||||
-rw-r--r-- | sys/sparc64/sparc64/trap.c | 2 | ||||
-rw-r--r-- | sys/sys/signalvar.h | 2 |
13 files changed, 40 insertions, 40 deletions
diff --git a/sys/alpha/alpha/trap.c b/sys/alpha/alpha/trap.c index d4df234..f52152a 100644 --- a/sys/alpha/alpha/trap.c +++ b/sys/alpha/alpha/trap.c @@ -584,7 +584,7 @@ trap(a0, a1, a2, entry, framep) framep->tf_regs[FRAME_TRAPARG_A0] = a0; framep->tf_regs[FRAME_TRAPARG_A1] = a1; framep->tf_regs[FRAME_TRAPARG_A2] = a2; - trapsignal(p, i, ucode); + trapsignal(td, i, ucode); out: if (user) { framep->tf_regs[FRAME_SP] = alpha_pal_rdusp(); diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index ac14f72..9a1cf43 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -680,7 +680,7 @@ osigreturn(td, uap) /* Go back to user mode if both flags are set. */ if ((eflags & PSL_VIP) && (eflags & PSL_VIF)) - trapsignal(p, SIGBUS, 0); + trapsignal(td, SIGBUS, 0); if (vm86->vm86_has_vme) { eflags = (tf->tf_eflags & ~VME_USERCHANGE) | @@ -721,7 +721,7 @@ osigreturn(td, uap) * other selectors, invalid %eip's and invalid %esp's. */ if (!CS_SECURE(scp->sc_cs)) { - trapsignal(p, SIGBUS, T_PROTFLT); + trapsignal(td, SIGBUS, T_PROTFLT); return (EINVAL); } regs->tf_ds = scp->sc_ds; @@ -798,7 +798,7 @@ freebsd4_sigreturn(td, uap) /* Go back to user mode if both flags are set. */ if ((eflags & PSL_VIP) && (eflags & PSL_VIF)) - trapsignal(p, SIGBUS, 0); + trapsignal(td, SIGBUS, 0); if (vm86->vm86_has_vme) { eflags = (tf->tf_eflags & ~VME_USERCHANGE) | @@ -844,7 +844,7 @@ freebsd4_sigreturn(td, uap) cs = ucp->uc_mcontext.mc_cs; if (!CS_SECURE(cs)) { printf("freebsd4_sigreturn: cs = 0x%x\n", cs); - trapsignal(p, SIGBUS, T_PROTFLT); + trapsignal(td, SIGBUS, T_PROTFLT); return (EINVAL); } @@ -905,7 +905,7 @@ sigreturn(td, uap) /* Go back to user mode if both flags are set. */ if ((eflags & PSL_VIP) && (eflags & PSL_VIF)) - trapsignal(p, SIGBUS, 0); + trapsignal(td, SIGBUS, 0); if (vm86->vm86_has_vme) { eflags = (tf->tf_eflags & ~VME_USERCHANGE) | @@ -951,7 +951,7 @@ sigreturn(td, uap) cs = ucp->uc_mcontext.mc_cs; if (!CS_SECURE(cs)) { printf("sigreturn: cs = 0x%x\n", cs); - trapsignal(p, SIGBUS, T_PROTFLT); + trapsignal(td, SIGBUS, T_PROTFLT); return (EINVAL); } diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index ac14f72..9a1cf43 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -680,7 +680,7 @@ osigreturn(td, uap) /* Go back to user mode if both flags are set. */ if ((eflags & PSL_VIP) && (eflags & PSL_VIF)) - trapsignal(p, SIGBUS, 0); + trapsignal(td, SIGBUS, 0); if (vm86->vm86_has_vme) { eflags = (tf->tf_eflags & ~VME_USERCHANGE) | @@ -721,7 +721,7 @@ osigreturn(td, uap) * other selectors, invalid %eip's and invalid %esp's. */ if (!CS_SECURE(scp->sc_cs)) { - trapsignal(p, SIGBUS, T_PROTFLT); + trapsignal(td, SIGBUS, T_PROTFLT); return (EINVAL); } regs->tf_ds = scp->sc_ds; @@ -798,7 +798,7 @@ freebsd4_sigreturn(td, uap) /* Go back to user mode if both flags are set. */ if ((eflags & PSL_VIP) && (eflags & PSL_VIF)) - trapsignal(p, SIGBUS, 0); + trapsignal(td, SIGBUS, 0); if (vm86->vm86_has_vme) { eflags = (tf->tf_eflags & ~VME_USERCHANGE) | @@ -844,7 +844,7 @@ freebsd4_sigreturn(td, uap) cs = ucp->uc_mcontext.mc_cs; if (!CS_SECURE(cs)) { printf("freebsd4_sigreturn: cs = 0x%x\n", cs); - trapsignal(p, SIGBUS, T_PROTFLT); + trapsignal(td, SIGBUS, T_PROTFLT); return (EINVAL); } @@ -905,7 +905,7 @@ sigreturn(td, uap) /* Go back to user mode if both flags are set. */ if ((eflags & PSL_VIP) && (eflags & PSL_VIF)) - trapsignal(p, SIGBUS, 0); + trapsignal(td, SIGBUS, 0); if (vm86->vm86_has_vme) { eflags = (tf->tf_eflags & ~VME_USERCHANGE) | @@ -951,7 +951,7 @@ sigreturn(td, uap) cs = ucp->uc_mcontext.mc_cs; if (!CS_SECURE(cs)) { printf("sigreturn: cs = 0x%x\n", cs); - trapsignal(p, SIGBUS, T_PROTFLT); + trapsignal(td, SIGBUS, T_PROTFLT); return (EINVAL); } diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c index 309c4fc..017a2e0 100644 --- a/sys/i386/linux/linux_sysvec.c +++ b/sys/i386/linux/linux_sysvec.c @@ -554,7 +554,7 @@ linux_sigreturn(struct thread *td, struct linux_sigreturn_args *args) */ #define CS_SECURE(cs) (ISPL(cs) == SEL_UPL) if (!CS_SECURE(frame.sf_sc.sc_cs)) { - trapsignal(p, SIGBUS, T_PROTFLT); + trapsignal(td, SIGBUS, T_PROTFLT); return(EINVAL); } @@ -652,7 +652,7 @@ linux_rt_sigreturn(struct thread *td, struct linux_rt_sigreturn_args *args) */ #define CS_SECURE(cs) (ISPL(cs) == SEL_UPL) if (!CS_SECURE(context->sc_cs)) { - trapsignal(p, SIGBUS, T_PROTFLT); + trapsignal(td, SIGBUS, T_PROTFLT); return(EINVAL); } diff --git a/sys/ia64/ia64/trap.c b/sys/ia64/ia64/trap.c index 30f43f5..3fdf9a6 100644 --- a/sys/ia64/ia64/trap.c +++ b/sys/ia64/ia64/trap.c @@ -740,7 +740,7 @@ trap(int vector, int imm, struct trapframe *framep) #ifdef DEBUG printtrap(vector, imm, framep, 1, user); #endif - trapsignal(p, i, ucode); + trapsignal(td, i, ucode); out: if (user) { userret(td, framep, sticks); @@ -1048,7 +1048,7 @@ ia32_syscall(struct trapframe *framep) */ if ((orig_eflags & PSL_T) && !(orig_eflags & PSL_VM)) { ia64_set_eflag(ia64_get_eflag() & ~PSL_T); - trapsignal(p, SIGTRAP, 0); + trapsignal(td, SIGTRAP, 0); } /* diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index ea2ab15..9bf4385 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1256,19 +1256,19 @@ pgsignal(pgrp, sig, checkctty) } /* - * Send a signal caused by a trap to the current process. + * Send a signal caused by a trap to the current thread. * If it will be caught immediately, deliver it with correct code. * Otherwise, post it normally. * * MPSAFE */ void -trapsignal(p, sig, code) - struct proc *p; - register int sig; - u_long code; +trapsignal(struct thread *td, int sig, u_long code) { - register struct sigacts *ps; + struct sigacts *ps; + struct proc *p; + + p = td->td_proc; PROC_LOCK(p); ps = p->p_sigacts; diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c index fe5f1e4..7fe4883 100644 --- a/sys/kern/subr_trap.c +++ b/sys/kern/subr_trap.c @@ -209,7 +209,7 @@ ast(struct trapframe *framep) PCB_NPXTRAP); ucode = npxtrap(); if (ucode != -1) { - trapsignal(p, SIGFPE, ucode); + trapsignal(td, SIGFPE, ucode); } } #endif diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c index ea42cdc..6ccdffe 100644 --- a/sys/pc98/i386/machdep.c +++ b/sys/pc98/i386/machdep.c @@ -700,7 +700,7 @@ osigreturn(td, uap) /* Go back to user mode if both flags are set. */ if ((eflags & PSL_VIP) && (eflags & PSL_VIF)) - trapsignal(p, SIGBUS, 0); + trapsignal(td, SIGBUS, 0); if (vm86->vm86_has_vme) { eflags = (tf->tf_eflags & ~VME_USERCHANGE) | @@ -741,7 +741,7 @@ osigreturn(td, uap) * other selectors, invalid %eip's and invalid %esp's. */ if (!CS_SECURE(scp->sc_cs)) { - trapsignal(p, SIGBUS, T_PROTFLT); + trapsignal(td, SIGBUS, T_PROTFLT); return (EINVAL); } regs->tf_ds = scp->sc_ds; @@ -818,7 +818,7 @@ freebsd4_sigreturn(td, uap) /* Go back to user mode if both flags are set. */ if ((eflags & PSL_VIP) && (eflags & PSL_VIF)) - trapsignal(p, SIGBUS, 0); + trapsignal(td, SIGBUS, 0); if (vm86->vm86_has_vme) { eflags = (tf->tf_eflags & ~VME_USERCHANGE) | @@ -864,7 +864,7 @@ freebsd4_sigreturn(td, uap) cs = ucp->uc_mcontext.mc_cs; if (!CS_SECURE(cs)) { printf("freebsd4_sigreturn: cs = 0x%x\n", cs); - trapsignal(p, SIGBUS, T_PROTFLT); + trapsignal(td, SIGBUS, T_PROTFLT); return (EINVAL); } @@ -925,7 +925,7 @@ sigreturn(td, uap) /* Go back to user mode if both flags are set. */ if ((eflags & PSL_VIP) && (eflags & PSL_VIF)) - trapsignal(p, SIGBUS, 0); + trapsignal(td, SIGBUS, 0); if (vm86->vm86_has_vme) { eflags = (tf->tf_eflags & ~VME_USERCHANGE) | @@ -971,7 +971,7 @@ sigreturn(td, uap) cs = ucp->uc_mcontext.mc_cs; if (!CS_SECURE(cs)) { printf("sigreturn: cs = 0x%x\n", cs); - trapsignal(p, SIGBUS, T_PROTFLT); + trapsignal(td, SIGBUS, T_PROTFLT); return (EINVAL); } diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c index ea42cdc..6ccdffe 100644 --- a/sys/pc98/pc98/machdep.c +++ b/sys/pc98/pc98/machdep.c @@ -700,7 +700,7 @@ osigreturn(td, uap) /* Go back to user mode if both flags are set. */ if ((eflags & PSL_VIP) && (eflags & PSL_VIF)) - trapsignal(p, SIGBUS, 0); + trapsignal(td, SIGBUS, 0); if (vm86->vm86_has_vme) { eflags = (tf->tf_eflags & ~VME_USERCHANGE) | @@ -741,7 +741,7 @@ osigreturn(td, uap) * other selectors, invalid %eip's and invalid %esp's. */ if (!CS_SECURE(scp->sc_cs)) { - trapsignal(p, SIGBUS, T_PROTFLT); + trapsignal(td, SIGBUS, T_PROTFLT); return (EINVAL); } regs->tf_ds = scp->sc_ds; @@ -818,7 +818,7 @@ freebsd4_sigreturn(td, uap) /* Go back to user mode if both flags are set. */ if ((eflags & PSL_VIP) && (eflags & PSL_VIF)) - trapsignal(p, SIGBUS, 0); + trapsignal(td, SIGBUS, 0); if (vm86->vm86_has_vme) { eflags = (tf->tf_eflags & ~VME_USERCHANGE) | @@ -864,7 +864,7 @@ freebsd4_sigreturn(td, uap) cs = ucp->uc_mcontext.mc_cs; if (!CS_SECURE(cs)) { printf("freebsd4_sigreturn: cs = 0x%x\n", cs); - trapsignal(p, SIGBUS, T_PROTFLT); + trapsignal(td, SIGBUS, T_PROTFLT); return (EINVAL); } @@ -925,7 +925,7 @@ sigreturn(td, uap) /* Go back to user mode if both flags are set. */ if ((eflags & PSL_VIP) && (eflags & PSL_VIF)) - trapsignal(p, SIGBUS, 0); + trapsignal(td, SIGBUS, 0); if (vm86->vm86_has_vme) { eflags = (tf->tf_eflags & ~VME_USERCHANGE) | @@ -971,7 +971,7 @@ sigreturn(td, uap) cs = ucp->uc_mcontext.mc_cs; if (!CS_SECURE(cs)) { printf("sigreturn: cs = 0x%x\n", cs); - trapsignal(p, SIGBUS, T_PROTFLT); + trapsignal(td, SIGBUS, T_PROTFLT); return (EINVAL); } diff --git a/sys/powerpc/aim/trap.c b/sys/powerpc/aim/trap.c index cd4a50b..95dea63 100644 --- a/sys/powerpc/aim/trap.c +++ b/sys/powerpc/aim/trap.c @@ -258,7 +258,7 @@ trap(struct trapframe *frame) if (sig != 0) { if (p->p_sysent->sv_transtrap != NULL) sig = (p->p_sysent->sv_transtrap)(sig, type); - trapsignal(p, sig, ucode); + trapsignal(td, sig, ucode); } userret(td, frame, sticks); diff --git a/sys/powerpc/powerpc/trap.c b/sys/powerpc/powerpc/trap.c index cd4a50b..95dea63 100644 --- a/sys/powerpc/powerpc/trap.c +++ b/sys/powerpc/powerpc/trap.c @@ -258,7 +258,7 @@ trap(struct trapframe *frame) if (sig != 0) { if (p->p_sysent->sv_transtrap != NULL) sig = (p->p_sysent->sv_transtrap)(sig, type); - trapsignal(p, sig, ucode); + trapsignal(td, sig, ucode); } userret(td, frame, sticks); diff --git a/sys/sparc64/sparc64/trap.c b/sys/sparc64/sparc64/trap.c index 7054048..c743162 100644 --- a/sys/sparc64/sparc64/trap.c +++ b/sys/sparc64/sparc64/trap.c @@ -284,7 +284,7 @@ trap(struct trapframe *tf) if (debugger_on_signal && (sig == 4 || sig == 10 || sig == 11)) Debugger("trapsig"); - trapsignal(p, sig, tf->tf_type); + trapsignal(td, sig, tf->tf_type); } userret(td, tf, sticks); diff --git a/sys/sys/signalvar.h b/sys/sys/signalvar.h index d7d7227..9ee4445 100644 --- a/sys/sys/signalvar.h +++ b/sys/sys/signalvar.h @@ -247,7 +247,7 @@ void psignal(struct proc *p, int sig); void sigexit(struct thread *td, int signum) __dead2; void siginit(struct proc *p); void signotify(struct proc *p); -void trapsignal(struct proc *p, int sig, u_long code); +void trapsignal(struct thread *td, int sig, u_long code); /* * Machine-dependent functions: |