diff options
Diffstat (limited to 'src/stdio/__stdio_read.c')
-rw-r--r-- | src/stdio/__stdio_read.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/stdio/__stdio_read.c b/src/stdio/__stdio_read.c index 59473444..f8fa6d3b 100644 --- a/src/stdio/__stdio_read.c +++ b/src/stdio/__stdio_read.c @@ -1,12 +1,5 @@ #include "stdio_impl.h" #include <sys/uio.h> -#include <pthread.h> - -static void cleanup(void *p) -{ - FILE *f = p; - if (!f->lockcount) __unlockfile(f); -} size_t __stdio_read(FILE *f, unsigned char *buf, size_t len) { @@ -16,9 +9,7 @@ size_t __stdio_read(FILE *f, unsigned char *buf, size_t len) }; ssize_t cnt; - pthread_cleanup_push(cleanup, f); - cnt = syscall_cp(SYS_readv, f->fd, iov, 2); - pthread_cleanup_pop(0); + cnt = syscall(SYS_readv, f->fd, iov, 2); if (cnt <= 0) { f->flags |= F_EOF ^ ((F_ERR^F_EOF) & cnt); return cnt; |