X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdio%2F__stdio_write.c;h=8c89389a574eb6061131cd926f2322f9a0967837;hb=e98a54643ee95032baab883673628314e520012e;hp=e52e91ae0f5e0dddc40ca98137fc17fe2c99c15d;hpb=835f9f950e2f6059532bd9ab9857a856ed21a4fd;p=musl diff --git a/src/stdio/__stdio_write.c b/src/stdio/__stdio_write.c index e52e91ae..8c89389a 100644 --- a/src/stdio/__stdio_write.c +++ b/src/stdio/__stdio_write.c @@ -19,13 +19,9 @@ size_t __stdio_write(FILE *f, const unsigned char *buf, size_t len) int iovcnt = 2; ssize_t cnt; for (;;) { - if (libc.main_thread) { - pthread_cleanup_push(cleanup, f); - cnt = syscall_cp(SYS_writev, f->fd, iov, iovcnt); - pthread_cleanup_pop(0); - } else { - cnt = syscall(SYS_writev, f->fd, iov, iovcnt); - } + pthread_cleanup_push(cleanup, f); + cnt = syscall_cp(SYS_writev, f->fd, iov, iovcnt); + pthread_cleanup_pop(0); if (cnt == rem) { f->wend = f->buf + f->buf_size; f->wpos = f->wbase = f->buf;