1#include <signal.h>
2#include <errno.h>
3#include "syscall.h"
4#include "libc.h"
5
6int sigtimedwait(const sigset_t *restrict mask, siginfo_t *restrict si, const struct timespec *restrict timeout)
7{
8	int ret;
9	do ret = syscall_cp(SYS_rt_sigtimedwait, mask,
10		si, timeout, _NSIG/8);
11	while (ret<0 && errno==EINTR);
12	return ret;
13}
14