[libc-commits] [PATCH] D156480: [libc] Add support for more file functions

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Aug 3 07:29:17 PDT 2023


jhuber6 added inline comments.


================
Comment at: libc/docs/gpu/support.rst:132
+feof           |check|
+ferror         |check|
+fgetc          |check|    |check|
----------------
tianshilei1992 wrote:
> This two don't need RPC?
So that's actually a can of worms I'm not sure what the best way to handle is. These don't require RPC because the file class maintains some internal state about the result of the last action, e.g. if the last return value was negative. But, this means that calling `feof` on the GPU will return something different if the last call was on the CPU. However, it also means that if we didn't want that to happen we'd need everything to go through RPC with very little ability to optimize anything from the GPU side. I'm sort-of leaning towards treating this as a similar case if you were to statically link a MUSL application with a glibc one, you should kind of see them as separate and not expect them to work well when mixed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156480



More information about the libc-commits mailing list