aboutsummaryrefslogtreecommitdiff
path: root/libc/src/stdio/gpu/fopen.cpp
diff options
context:
space:
mode:
authorJoseph Huber <huberjn@outlook.com>2024-10-15 12:31:06 -0700
committerGitHub <noreply@github.com>2024-10-15 12:31:06 -0700
commitbe0c67c90e045b03b0ffecc06ca6f93e440f48d8 (patch)
tree7c3aa03c9253eb2e037541e28f6f15f5c48aae83 /libc/src/stdio/gpu/fopen.cpp
parent224f62de9e34d537b1fd282b47b773b04bea34f1 (diff)
downloadllvm-be0c67c90e045b03b0ffecc06ca6f93e440f48d8.zip
llvm-be0c67c90e045b03b0ffecc06ca6f93e440f48d8.tar.gz
llvm-be0c67c90e045b03b0ffecc06ca6f93e440f48d8.tar.bz2
[libc] Remove dependency on `cpp::function` in `rpc.h` (#112422)
Summary: I'm going to attempt to move the `rpc.h` header to a separate folder that we can install and include outside of `libc`. Before doing this I'm going to try to trim up the file so there's not as many things I need to copy to make it work. This dependency on `cpp::functional` is a low hanging fruit. I only did it so that I could overload the argument of the work function so that passing the id was optional in the lambda, that's not a *huge* deal and it makes it more explicit I suppose.
Diffstat (limited to 'libc/src/stdio/gpu/fopen.cpp')
-rw-r--r--libc/src/stdio/gpu/fopen.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/src/stdio/gpu/fopen.cpp b/libc/src/stdio/gpu/fopen.cpp
index 76daece..e165d2a 100644
--- a/libc/src/stdio/gpu/fopen.cpp
+++ b/libc/src/stdio/gpu/fopen.cpp
@@ -21,10 +21,10 @@ LLVM_LIBC_FUNCTION(::FILE *, fopen,
rpc::Client::Port port = rpc::client.open<RPC_OPEN_FILE>();
port.send_n(path, internal::string_length(path) + 1);
port.send_and_recv(
- [=](rpc::Buffer *buffer) {
+ [=](rpc::Buffer *buffer, uint32_t) {
inline_memcpy(buffer->data, mode, internal::string_length(mode) + 1);
},
- [&](rpc::Buffer *buffer) { file = buffer->data[0]; });
+ [&](rpc::Buffer *buffer, uint32_t) { file = buffer->data[0]; });
port.close();
return reinterpret_cast<FILE *>(file);