Changeset View
Changeset View
Standalone View
Standalone View
head/sys/powerpc/powerpc/exec_machdep.c
Show First 20 Lines • Show All 328 Lines • ▼ Show 20 Lines | if (copyin(uap->sigcntxp, &uc, sizeof(uc)) != 0) { | ||||
CTR1(KTR_SIG, "sigreturn: efault td=%p", td); | CTR1(KTR_SIG, "sigreturn: efault td=%p", td); | ||||
return (EFAULT); | return (EFAULT); | ||||
} | } | ||||
error = set_mcontext(td, &uc.uc_mcontext); | error = set_mcontext(td, &uc.uc_mcontext); | ||||
if (error != 0) | if (error != 0) | ||||
return (error); | return (error); | ||||
kern_sigprocmask(td, SIG_SETMASK, &uc.uc_sigmask, NULL, 0); | |||||
/* | /* | ||||
* Save FPU state if needed. User may have changed it on | * Save FPU state if needed. User may have changed it on | ||||
* signal handler | * signal handler | ||||
*/ | */ | ||||
if (uc.uc_mcontext.mc_srr1 & PSL_FP) | if (uc.uc_mcontext.mc_srr1 & PSL_FP) | ||||
save_fpu(td); | save_fpu(td); | ||||
kern_sigprocmask(td, SIG_SETMASK, &uc.uc_sigmask, NULL, 0); | |||||
CTR3(KTR_SIG, "sigreturn: return td=%p pc=%#x sp=%#x", | CTR3(KTR_SIG, "sigreturn: return td=%p pc=%#x sp=%#x", | ||||
td, uc.uc_mcontext.mc_srr0, uc.uc_mcontext.mc_gpr[1]); | td, uc.uc_mcontext.mc_srr0, uc.uc_mcontext.mc_gpr[1]); | ||||
return (EJUSTRETURN); | return (EJUSTRETURN); | ||||
} | } | ||||
#ifdef COMPAT_FREEBSD4 | #ifdef COMPAT_FREEBSD4 | ||||
int | int | ||||
▲ Show 20 Lines • Show All 477 Lines • ▼ Show 20 Lines | if (copyin(uap->sigcntxp, &uc, sizeof(uc)) != 0) { | ||||
CTR1(KTR_SIG, "sigreturn: efault td=%p", td); | CTR1(KTR_SIG, "sigreturn: efault td=%p", td); | ||||
return (EFAULT); | return (EFAULT); | ||||
} | } | ||||
error = set_mcontext32(td, &uc.uc_mcontext); | error = set_mcontext32(td, &uc.uc_mcontext); | ||||
if (error != 0) | if (error != 0) | ||||
return (error); | return (error); | ||||
kern_sigprocmask(td, SIG_SETMASK, &uc.uc_sigmask, NULL, 0); | |||||
/* | /* | ||||
* Save FPU state if needed. User may have changed it on | * Save FPU state if needed. User may have changed it on | ||||
* signal handler | * signal handler | ||||
*/ | */ | ||||
if (uc.uc_mcontext.mc_srr1 & PSL_FP) | if (uc.uc_mcontext.mc_srr1 & PSL_FP) | ||||
save_fpu(td); | save_fpu(td); | ||||
kern_sigprocmask(td, SIG_SETMASK, &uc.uc_sigmask, NULL, 0); | |||||
CTR3(KTR_SIG, "sigreturn: return td=%p pc=%#x sp=%#x", | CTR3(KTR_SIG, "sigreturn: return td=%p pc=%#x sp=%#x", | ||||
td, uc.uc_mcontext.mc_srr0, uc.uc_mcontext.mc_gpr[1]); | td, uc.uc_mcontext.mc_srr0, uc.uc_mcontext.mc_gpr[1]); | ||||
return (EJUSTRETURN); | return (EJUSTRETURN); | ||||
} | } | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 360 Lines • Show Last 20 Lines |