[libc-commits] [libc] [libc] Export the RPC interface from `libc` (PR #71432)

Jon Chesterfield via libc-commits libc-commits at lists.llvm.org
Thu Nov 9 10:05:47 PST 2023


JonChesterfield wrote:

There's a fundamental layering violation in what we've done here which is probably the root cause of the API grief.

Libc _depends on_ syscall, libc _does not contain_ syscall. We should aspire to put the RPC machinery somewhere else, leave the implementation of fopen and similar in libc, but have the templated state machine exist independent of the exported API constructs of libc. It's a good candidate for some interpretations of llvm/offload.

Suggest we take the bits of rpc that would be nice to export in type safe, non-function-pointery fashion and make those usable in a header only sense, not wire it up into libc's interface, and #include them from within openmp or whatever with total disregard to the exported C interface until such time as they have a new home.

https://github.com/llvm/llvm-project/pull/71432


More information about the libc-commits mailing list