提交 11dbbe9f 编写于 作者: R Rich Felker

more cancellation points: tcdrain, clock_nanosleep

上级 c8c4ef7d
#include <termios.h>
#include <sys/ioctl.h>
#include "libc.h"
int tcdrain(int fd)
{
return ioctl(fd, TCSBRK, 1);
int ret;
CANCELPT_BEGIN;
ret = ioctl(fd, TCSBRK, 1);
CANCELPT_END;
return ret;
}
#define SYSCALL_RETURN_ERRNO
#include <time.h>
#include "syscall.h"
#include "libc.h"
int clock_nanosleep(clockid_t clk, int flags, const struct timespec *req, struct timespec *rem)
{
return syscall4(__NR_clock_nanosleep, clk, flags, (long)req, (long)rem);
int ret;
CANCELPT_BEGIN;
ret = syscall4(__NR_clock_nanosleep, clk, flags, (long)req, (long)rem);
CANCELPT_END;
return ret;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册