[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 14:54:51 PDT 2022


sivachandra accepted this revision.
sivachandra added a comment.
This revision is now accepted and ready to land.

LGTM modulo one comment about the NBF operation.



================
Comment at: libc/src/__support/File/file.cpp:54
+  if (written < len)
+    err = true;
+  return written;
----------------
You should have an `else` which does `platfrom_flush()`?


================
Comment at: libc/src/__support/File/file.cpp:169
+
+  flush_unlocked();
+
----------------
You shouldn't need this as the NBF operation does platform flush anyway. My previous comment suggested this assuming FBF on line 163.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126829/new/

https://reviews.llvm.org/D126829



More information about the libc-commits mailing list