version 1.6.2.5, 2005/11/10 14:01:21 |
version 1.7, 2003/10/13 18:55:30 |
Line 40 __KERNEL_RCSID(0, "$NetBSD$"); |
|
Line 40 __KERNEL_RCSID(0, "$NetBSD$"); |
|
#include <sys/signalvar.h> |
#include <sys/signalvar.h> |
#include <sys/proc.h> |
#include <sys/proc.h> |
#include <sys/wait.h> |
#include <sys/wait.h> |
#include <sys/dirent.h> |
|
|
|
#include <uvm/uvm_extern.h> |
#include <uvm/uvm_extern.h> |
|
|
#include <compat/netbsd32/netbsd32.h> |
#include <compat/netbsd32/netbsd32.h> |
#include <compat/netbsd32/netbsd32_conv.h> |
|
#include <compat/netbsd32/netbsd32_syscallargs.h> |
#include <compat/netbsd32/netbsd32_syscallargs.h> |
|
|
#include <compat/sys/signal.h> |
|
#include <compat/sys/signalvar.h> |
|
#include <compat/sys/siginfo.h> |
|
#include <compat/sys/ucontext.h> |
|
|
|
#ifdef unused |
|
static void netbsd32_si32_to_si(siginfo_t *, const siginfo32_t *); |
|
#endif |
|
|
|
|
|
int |
int |
netbsd32_sigaction(l, v, retval) |
netbsd32_sigaction(l, v, retval) |
struct lwp *l; |
struct lwp *l; |
Line 82 netbsd32_sigaction(l, v, retval) |
|
Line 70 netbsd32_sigaction(l, v, retval) |
|
nsa.sa_mask = sa32.netbsd32_sa_mask; |
nsa.sa_mask = sa32.netbsd32_sa_mask; |
nsa.sa_flags = sa32.netbsd32_sa_flags; |
nsa.sa_flags = sa32.netbsd32_sa_flags; |
} |
} |
error = sigaction1(l->l_proc, SCARG(uap, signum), |
error = sigaction1(l->l_proc, SCARG(uap, signum), |
SCARG(uap, nsa) ? &nsa : 0, |
SCARG(uap, nsa) ? &nsa : 0, |
SCARG(uap, osa) ? &osa : 0, |
SCARG(uap, osa) ? &osa : 0, |
NULL, 0); |
NULL, 0); |
|
|
if (error) |
if (error) |
return (error); |
return (error); |
|
|
Line 229 netbsd32___sigaction_sigtramp(l, v, retv |
|
Line 217 netbsd32___sigaction_sigtramp(l, v, retv |
|
return (0); |
return (0); |
} |
} |
|
|
#ifdef unused |
void |
static void |
netbsd32_si32_to_si(siginfo_t *si, siginfo32_t *si32) |
netbsd32_si32_to_si(siginfo_t *si, const siginfo32_t *si32) |
|
{ |
{ |
memset(si, 0, sizeof (*si)); |
memset(si, 0, sizeof (*si)); |
si->si_signo = si32->si_signo; |
si->si_signo = si32->si_signo; |
Line 270 netbsd32_si32_to_si(siginfo_t *si, const |
|
Line 257 netbsd32_si32_to_si(siginfo_t *si, const |
|
break; |
break; |
} |
} |
} |
} |
#endif |
|
|
|
void |
void |
netbsd32_si_to_si32(siginfo32_t *si32, const siginfo_t *si) |
netbsd32_si_to_si32(siginfo32_t *si32, siginfo_t *si) |
{ |
{ |
memset(si32, 0, sizeof (*si32)); |
memset(si32, 0, sizeof (*si32)); |
si32->si_signo = si->si_signo; |
si32->si_signo = si->si_signo; |
Line 404 netbsd32_setcontext(struct lwp *l, void |
|
Line 390 netbsd32_setcontext(struct lwp *l, void |
|
|
|
return (EJUSTRETURN); |
return (EJUSTRETURN); |
} |
} |
|
|
static int |
|
netbsd32_sigtimedwait_put_info(const void *src, void *dst, size_t size) |
|
{ |
|
const siginfo_t *info = src; |
|
siginfo32_t info32; |
|
|
|
netbsd32_si_to_si32(&info32, info); |
|
|
|
return copyout(&info32, dst, sizeof(info32)); |
|
} |
|
|
|
static int |
|
netbsd32_sigtimedwait_fetch_timeout(const void *src, void *dst, size_t size) |
|
{ |
|
struct timespec *ts = dst; |
|
struct netbsd32_timespec ts32; |
|
int error; |
|
|
|
error = copyin(src, &ts32, sizeof(ts32)); |
|
if (error) |
|
return error; |
|
|
|
netbsd32_to_timespec(&ts32, ts); |
|
return 0; |
|
} |
|
|
|
static int |
|
netbsd32_sigtimedwait_put_timeout(const void *src, void *dst, size_t size) |
|
{ |
|
const struct timespec *ts = src; |
|
struct netbsd32_timespec ts32; |
|
|
|
netbsd32_from_timespec(ts, &ts32); |
|
|
|
return copyout(&ts32, dst, sizeof(ts32)); |
|
} |
|
|
|
int |
|
netbsd32___sigtimedwait(struct lwp *l, void *v, register_t *retval) |
|
{ |
|
struct netbsd32___sigtimedwait_args /* { |
|
syscallarg(netbsd32_sigsetp_t) set; |
|
syscallarg(netbsd32_siginfop_t) info; |
|
syscallarg(netbsd32_timespecp_t) timeout; |
|
} */ *uap = v; |
|
struct sys___sigtimedwait_args ua; |
|
|
|
NETBSD32TOP_UAP(set, const sigset_t); |
|
NETBSD32TOP_UAP(info, siginfo_t); |
|
NETBSD32TOP_UAP(timeout, struct timespec); |
|
|
|
return __sigtimedwait1(l, &ua, retval, netbsd32_sigtimedwait_put_info, |
|
netbsd32_sigtimedwait_fetch_timeout, |
|
netbsd32_sigtimedwait_put_timeout); |
|
} |
|