[libc-commits] [PATCH] D126829: [libc] add buffering to FILE writes
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Thu Jun 9 22:31:13 PDT 2022
sivachandra added inline comments.
Comment at: libc/src/__support/File/file.cpp:54
+ if (written < len)
+ err = true;
+ return written;
> sivachandra wrote:
> > You should have an `else` which does `platfrom_flush()`?
> I have the flush outside of the unbuffered write so that in the fully buffered function (line 63) we can use the unbuffered write when the data is too large for the buffer. This means that in the base `write_unlocked` function and in `write_unlocked_lbf` we have to flush separately, but I think that's okay.
Ah, I missed that!
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the libc-commits