Add a machine depended function thread_siginfo, SA signal code
will use the function to construct a siginfo structure and use the result to export to userland. Reviewed by: julian
This commit is contained in:
parent
cf260fe35a
commit
b8f480ab94
@ -1461,6 +1461,25 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
|
||||
alpha_pal_wrusp((unsigned long)sfp);
|
||||
}
|
||||
|
||||
/*
|
||||
* Build siginfo_t for SA thread
|
||||
*/
|
||||
void
|
||||
thread_siginfo(int sig, u_long code, siginfo_t *si)
|
||||
{
|
||||
struct proc *p;
|
||||
struct thread *td;
|
||||
|
||||
td = curthread;
|
||||
p = td->td_proc;
|
||||
PROC_LOCK_ASSERT(p, MA_OWNED);
|
||||
|
||||
bzero(si, sizeof(*si));
|
||||
si->si_signo = sig;
|
||||
si->si_code = code;
|
||||
/* XXXKSE fill other fields */
|
||||
}
|
||||
|
||||
/*
|
||||
* System call to cleanup state after a signal
|
||||
* has been taken. Reset signal mask and
|
||||
|
@ -299,6 +299,25 @@ sendsig(catcher, sig, mask, code)
|
||||
mtx_lock(&psp->ps_mtx);
|
||||
}
|
||||
|
||||
/*
|
||||
* Build siginfo_t for SA thread
|
||||
*/
|
||||
void
|
||||
thread_siginfo(int sig, u_long code, siginfo_t *si)
|
||||
{
|
||||
struct proc *p;
|
||||
struct thread *td;
|
||||
|
||||
td = curthread;
|
||||
p = td->td_proc;
|
||||
PROC_LOCK_ASSERT(p, MA_OWNED);
|
||||
|
||||
bzero(si, sizeof(*si));
|
||||
si->si_signo = sig;
|
||||
si->si_code = code;
|
||||
/* XXXKSE fill other fields */
|
||||
}
|
||||
|
||||
/*
|
||||
* System call to cleanup state after a signal
|
||||
* has been taken. Reset signal mask and
|
||||
|
@ -630,6 +630,26 @@ sendsig(catcher, sig, mask, code)
|
||||
mtx_lock(&psp->ps_mtx);
|
||||
}
|
||||
|
||||
/*
|
||||
* Build siginfo_t for SA thread
|
||||
*/
|
||||
void
|
||||
thread_siginfo(int sig, u_long code, siginfo_t *si)
|
||||
{
|
||||
struct proc *p;
|
||||
struct thread *td;
|
||||
|
||||
td = curthread;
|
||||
p = td->td_proc;
|
||||
PROC_LOCK_ASSERT(p, MA_OWNED);
|
||||
|
||||
bzero(si, sizeof(*si));
|
||||
si->si_signo = sig;
|
||||
si->si_code = code;
|
||||
si->si_addr = (void *)td->td_frame->tf_err;
|
||||
/* XXXKSE fill other fields */
|
||||
}
|
||||
|
||||
/*
|
||||
* System call to cleanup state after a signal
|
||||
* has been taken. Reset signal mask and
|
||||
|
@ -937,6 +937,25 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
|
||||
mtx_lock(&psp->ps_mtx);
|
||||
}
|
||||
|
||||
/*
|
||||
* Build siginfo_t for SA thread
|
||||
*/
|
||||
void
|
||||
thread_siginfo(int sig, u_long code, siginfo_t *si)
|
||||
{
|
||||
struct proc *p;
|
||||
struct thread *td;
|
||||
|
||||
td = curthread;
|
||||
p = td->td_proc;
|
||||
PROC_LOCK_ASSERT(p, MA_OWNED);
|
||||
|
||||
bzero(si, sizeof(*si));
|
||||
si->si_signo = sig;
|
||||
si->si_code = code;
|
||||
/* XXXKSE fill other fields */
|
||||
}
|
||||
|
||||
/*
|
||||
* System call to cleanup state after a signal
|
||||
* has been taken. Reset signal mask and
|
||||
|
@ -686,6 +686,26 @@ sendsig(catcher, sig, mask, code)
|
||||
mtx_lock(&psp->ps_mtx);
|
||||
}
|
||||
|
||||
/*
|
||||
* Build siginfo_t for SA thread
|
||||
*/
|
||||
void
|
||||
thread_siginfo(int sig, u_long code, siginfo_t *si)
|
||||
{
|
||||
struct proc *p;
|
||||
struct thread *td;
|
||||
|
||||
td = curthread;
|
||||
p = td->td_proc;
|
||||
PROC_LOCK_ASSERT(p, MA_OWNED);
|
||||
|
||||
bzero(si, sizeof(*si));
|
||||
si->si_signo = sig;
|
||||
si->si_code = code;
|
||||
si->si_addr = (void *)td->td_frame->tf_err;
|
||||
/* XXXKSE fill other fields */
|
||||
}
|
||||
|
||||
/*
|
||||
* System call to cleanup state after a signal
|
||||
* has been taken. Reset signal mask and
|
||||
|
@ -686,6 +686,26 @@ sendsig(catcher, sig, mask, code)
|
||||
mtx_lock(&psp->ps_mtx);
|
||||
}
|
||||
|
||||
/*
|
||||
* Build siginfo_t for SA thread
|
||||
*/
|
||||
void
|
||||
thread_siginfo(int sig, u_long code, siginfo_t *si)
|
||||
{
|
||||
struct proc *p;
|
||||
struct thread *td;
|
||||
|
||||
td = curthread;
|
||||
p = td->td_proc;
|
||||
PROC_LOCK_ASSERT(p, MA_OWNED);
|
||||
|
||||
bzero(si, sizeof(*si));
|
||||
si->si_signo = sig;
|
||||
si->si_code = code;
|
||||
si->si_addr = (void *)td->td_frame->tf_err;
|
||||
/* XXXKSE fill other fields */
|
||||
}
|
||||
|
||||
/*
|
||||
* System call to cleanup state after a signal
|
||||
* has been taken. Reset signal mask and
|
||||
|
@ -505,6 +505,25 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
|
||||
mtx_lock(&psp->ps_mtx);
|
||||
}
|
||||
|
||||
/*
|
||||
* Build siginfo_t for SA thread
|
||||
*/
|
||||
void
|
||||
thread_siginfo(int sig, u_long code, siginfo_t *si)
|
||||
{
|
||||
struct proc *p;
|
||||
struct thread *td;
|
||||
|
||||
td = curthread;
|
||||
p = td->td_proc;
|
||||
PROC_LOCK_ASSERT(p, MA_OWNED);
|
||||
|
||||
bzero(si, sizeof(*si));
|
||||
si->si_signo = sig;
|
||||
si->si_code = code;
|
||||
/* XXXKSE fill other fields */
|
||||
}
|
||||
|
||||
int
|
||||
sigreturn(struct thread *td, struct sigreturn_args *uap)
|
||||
{
|
||||
|
@ -505,6 +505,25 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
|
||||
mtx_lock(&psp->ps_mtx);
|
||||
}
|
||||
|
||||
/*
|
||||
* Build siginfo_t for SA thread
|
||||
*/
|
||||
void
|
||||
thread_siginfo(int sig, u_long code, siginfo_t *si)
|
||||
{
|
||||
struct proc *p;
|
||||
struct thread *td;
|
||||
|
||||
td = curthread;
|
||||
p = td->td_proc;
|
||||
PROC_LOCK_ASSERT(p, MA_OWNED);
|
||||
|
||||
bzero(si, sizeof(*si));
|
||||
si->si_signo = sig;
|
||||
si->si_code = code;
|
||||
/* XXXKSE fill other fields */
|
||||
}
|
||||
|
||||
int
|
||||
sigreturn(struct thread *td, struct sigreturn_args *uap)
|
||||
{
|
||||
|
@ -488,6 +488,25 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
|
||||
mtx_lock(&psp->ps_mtx);
|
||||
}
|
||||
|
||||
/*
|
||||
* Build siginfo_t for SA thread
|
||||
*/
|
||||
void
|
||||
thread_siginfo(int sig, u_long code, siginfo_t *si)
|
||||
{
|
||||
struct proc *p;
|
||||
struct thread *td;
|
||||
|
||||
td = curthread;
|
||||
p = td->td_proc;
|
||||
PROC_LOCK_ASSERT(p, MA_OWNED);
|
||||
|
||||
bzero(si, sizeof(*si));
|
||||
si->si_signo = sig;
|
||||
si->si_code = code;
|
||||
/* XXXKSE fill other fields */
|
||||
}
|
||||
|
||||
#ifndef _SYS_SYSPROTO_H_
|
||||
struct sigreturn_args {
|
||||
ucontext_t *ucp;
|
||||
|
Loading…
x
Reference in New Issue
Block a user