Ejemplo n.º 1
0
/*
 * sigtimedwait(2) system call, used also for implementation
 * of sigwaitinfo() and sigwait().
 *
 * This only handles single LWP in signal wait. libpthread provides
 * it's own sigtimedwait() wrapper to DTRT WRT individual threads.
 */
int
sys_____sigtimedwait50(struct lwp *l,
    const struct sys_____sigtimedwait50_args *uap, register_t *retval)
{

	return sigtimedwait1(l, uap, retval, copyin, copyout, copyin, copyout);
}
int
compat_50_netbsd32___sigtimedwait(struct lwp *l,
    const struct compat_50_netbsd32___sigtimedwait_args *uap, register_t *retval)
{
	/* {
		syscallarg(netbsd32_sigsetp_t) set;
		syscallarg(netbsd32_siginfop_t) info;
		syscallarg(netbsd32_timespec50p_t) timeout;
	} */
	struct sys_____sigtimedwait50_args ua;
	int res;

	NETBSD32TOP_UAP(set, const sigset_t);
	NETBSD32TOP_UAP(info, siginfo_t);
	NETBSD32TOP_UAP(timeout, struct timespec);

	res = sigtimedwait1(l, &ua, retval,
	    copyin,
	    compat_50_netbsd32_sigtimedwait_put_info,
	    compat_50_netbsd32_sigtimedwait_fetch_timeout,
	    compat_50_netbsd32_sigtimedwait_put_timeout);
	if (!res)
		*retval = 0; /* XXX NetBSD<=5 was not POSIX compliant */
	return res;
}
Ejemplo n.º 3
0
int
linux_sys_rt_sigtimedwait(struct lwp *l,
    const struct linux_sys_rt_sigtimedwait_args *uap, register_t *retval)
{
	/* {
		syscallarg(const linux_sigset_t *) set;
		syscallarg(linux_siginfo_t *) info);
		syscallarg(const struct linux_timespec *) timeout;
	} */

	return sigtimedwait1(l, (const struct sys_____sigtimedwait50_args *)uap,
	    retval, fetchss, storeinfo, fetchts, fakestorets);
}
Ejemplo n.º 4
0
int
linux32_sys_rt_sigtimedwait(struct lwp *l,
    const struct linux32_sys_rt_sigtimedwait_args *uap, register_t *retval)
{
	/* {
		syscallarg(const linux32_sigset_t *) set;
		syscallarg(linux32_siginfo_t *) info);
		syscallarg(const struct linux32_timespec *) timeout;
	} */
	struct sys_____sigtimedwait50_args ap;

	SCARG(&ap, set) = SCARG_P32(uap, set);
	SCARG(&ap, info) = SCARG_P32(uap, info);
	SCARG(&ap, timeout) = SCARG_P32(uap, timeout);

	return sigtimedwait1(l, &ap,
	    retval, fetchss, storeinfo, fetchts, fakestorets);
}
Ejemplo n.º 5
0
int
netbsd32_____sigtimedwait50(struct lwp *l, const struct netbsd32_____sigtimedwait50_args *uap, register_t *retval)
{
	/* {
		syscallarg(netbsd32_sigsetp_t) set;
		syscallarg(netbsd32_siginfop_t) info;
		syscallarg(netbsd32_timespec50p_t) timeout;
	} */
	struct sys_____sigtimedwait50_args ua;

	NETBSD32TOP_UAP(set, const sigset_t);
	NETBSD32TOP_UAP(info, siginfo_t);
	NETBSD32TOP_UAP(timeout, struct timespec);

	return sigtimedwait1(l, &ua, retval,
	    copyin,
	    netbsd32_sigtimedwait_put_info,
	    netbsd32_sigtimedwait_fetch_timeout,
	    netbsd32_sigtimedwait_put_timeout);
}