about summary refs log tree commit diff
path: root/src/signal/sigtimedwait.c
blob: 1694cbe13cc1e49e985e904e9c38a703639782a2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <signal.h>
#include <errno.h>
#include "syscall.h"
#include "libc.h"

int sigtimedwait(const sigset_t *mask, siginfo_t *si, const struct timespec *timeout)
{
	int ret;
	CANCELPT_BEGIN;
	do {
		ret = syscall(SYS_rt_sigtimedwait, mask, si, timeout, 8);
		if (ret<0) CANCELPT_TRY;
	} while (ret<0 && errno==EINTR);
	CANCELPT_END;
	return ret;
}