mirror of
https://git.musl-libc.org/git/musl
synced 2025-01-23 06:32:05 +03:00
make sigtimedwait a cancellation point
This commit is contained in:
parent
0a949ebdf0
commit
5b9429adb7
@ -1,12 +1,15 @@
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include "syscall.h"
|
#include "syscall.h"
|
||||||
|
#include "libc.h"
|
||||||
|
|
||||||
int sigtimedwait(const sigset_t *mask, siginfo_t *si, const struct timespec *timeout)
|
int sigtimedwait(const sigset_t *mask, siginfo_t *si, const struct timespec *timeout)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
CANCELPT_BEGIN;
|
||||||
do {
|
do {
|
||||||
ret = syscall4(__NR_rt_sigtimedwait, (long)mask, (long)si, (long)timeout, SYSCALL_SIGSET_SIZE);
|
ret = syscall4(__NR_rt_sigtimedwait, (long)mask, (long)si, (long)timeout, SYSCALL_SIGSET_SIZE);
|
||||||
} while (ret<0 && errno==EINTR);
|
} while (ret<0 && errno==EINTR);
|
||||||
|
CANCELPT_END;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user