diff options
Diffstat (limited to 'src/unistd')
-rw-r--r-- | src/unistd/close.c | 5 | ||||
-rw-r--r-- | src/unistd/pause.c | 6 | ||||
-rw-r--r-- | src/unistd/pread.c | 6 | ||||
-rw-r--r-- | src/unistd/pwrite.c | 6 | ||||
-rw-r--r-- | src/unistd/read.c | 6 | ||||
-rw-r--r-- | src/unistd/readv.c | 6 | ||||
-rw-r--r-- | src/unistd/write.c | 6 | ||||
-rw-r--r-- | src/unistd/writev.c | 6 |
8 files changed, 9 insertions, 38 deletions
diff --git a/src/unistd/close.c b/src/unistd/close.c index f52c0ef3..231f79ef 100644 --- a/src/unistd/close.c +++ b/src/unistd/close.c @@ -4,8 +4,7 @@ int close(int fd) { - int ret = syscall(SYS_close, fd); - CANCELPT_BEGIN; - CANCELPT_END; + int ret = syscall_cp(SYS_close, fd); + if (libc.testcancel) libc.testcancel(); return ret; } diff --git a/src/unistd/pause.c b/src/unistd/pause.c index 57ed25e5..f7ed17d1 100644 --- a/src/unistd/pause.c +++ b/src/unistd/pause.c @@ -4,9 +4,5 @@ int pause(void) { - int r; - CANCELPT_BEGIN; - r = syscall(SYS_pause); - CANCELPT_END; - return r; + return syscall_cp(SYS_pause); } diff --git a/src/unistd/pread.c b/src/unistd/pread.c index 0a045013..1bf0c754 100644 --- a/src/unistd/pread.c +++ b/src/unistd/pread.c @@ -4,11 +4,7 @@ ssize_t pread(int fd, void *buf, size_t size, off_t ofs) { - ssize_t r; - CANCELPT_BEGIN; - r = syscall(SYS_pread, fd, buf, size, __SYSCALL_LL(ofs)); - CANCELPT_END; - return r; + return syscall_cp(SYS_pread, fd, buf, size, __SYSCALL_LL(ofs)); } LFS64(pread); diff --git a/src/unistd/pwrite.c b/src/unistd/pwrite.c index f878bb63..224eacdd 100644 --- a/src/unistd/pwrite.c +++ b/src/unistd/pwrite.c @@ -4,11 +4,7 @@ ssize_t pwrite(int fd, const void *buf, size_t size, off_t ofs) { - ssize_t r; - CANCELPT_BEGIN; - r = syscall(SYS_pwrite, fd, buf, size, __SYSCALL_LL(ofs)); - CANCELPT_END; - return r; + return syscall_cp(SYS_pwrite, fd, buf, size, __SYSCALL_LL(ofs)); } LFS64(pwrite); diff --git a/src/unistd/read.c b/src/unistd/read.c index 194b389e..eb882fcc 100644 --- a/src/unistd/read.c +++ b/src/unistd/read.c @@ -4,9 +4,5 @@ ssize_t read(int fd, void *buf, size_t count) { - ssize_t r; - CANCELPT_BEGIN; - r = syscall(SYS_read, fd, buf, count); - CANCELPT_END; - return r; + return syscall_cp(SYS_read, fd, buf, count); } diff --git a/src/unistd/readv.c b/src/unistd/readv.c index 9b87728e..e45cb484 100644 --- a/src/unistd/readv.c +++ b/src/unistd/readv.c @@ -4,9 +4,5 @@ ssize_t readv(int fd, const struct iovec *iov, int count) { - ssize_t r; - CANCELPT_BEGIN; - r = syscall(SYS_readv, fd, iov, count); - CANCELPT_END; - return r; + return syscall_cp(SYS_readv, fd, iov, count); } diff --git a/src/unistd/write.c b/src/unistd/write.c index a8284b32..e2f7e1f2 100644 --- a/src/unistd/write.c +++ b/src/unistd/write.c @@ -4,9 +4,5 @@ ssize_t write(int fd, const void *buf, size_t count) { - int r; - CANCELPT_BEGIN; - r = syscall(SYS_write, fd, buf, count); - CANCELPT_END; - return r; + return syscall_cp(SYS_write, fd, buf, count); } diff --git a/src/unistd/writev.c b/src/unistd/writev.c index a45afeb7..ef300ddf 100644 --- a/src/unistd/writev.c +++ b/src/unistd/writev.c @@ -4,9 +4,5 @@ ssize_t writev(int fd, const struct iovec *iov, int count) { - ssize_t r; - CANCELPT_BEGIN; - r = syscall(SYS_writev, fd, iov, count); - CANCELPT_END; - return r; + return syscall_cp(SYS_writev, fd, iov, count); } |