diff options
author | Joseph Huber <huberjn@outlook.com> | 2024-10-15 12:31:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-15 12:31:06 -0700 |
commit | be0c67c90e045b03b0ffecc06ca6f93e440f48d8 (patch) | |
tree | 7c3aa03c9253eb2e037541e28f6f15f5c48aae83 /libc/src/stdlib/gpu/system.cpp | |
parent | 224f62de9e34d537b1fd282b47b773b04bea34f1 (diff) | |
download | llvm-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/stdlib/gpu/system.cpp')
-rw-r--r-- | libc/src/stdlib/gpu/system.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libc/src/stdlib/gpu/system.cpp b/libc/src/stdlib/gpu/system.cpp index acf3a8c..1890006 100644 --- a/libc/src/stdlib/gpu/system.cpp +++ b/libc/src/stdlib/gpu/system.cpp @@ -19,8 +19,9 @@ LLVM_LIBC_FUNCTION(int, system, (const char *command)) { int ret; rpc::Client::Port port = rpc::client.open<RPC_SYSTEM>(); port.send_n(command, internal::string_length(command) + 1); - port.recv( - [&](rpc::Buffer *buffer) { ret = static_cast<int>(buffer->data[0]); }); + port.recv([&](rpc::Buffer *buffer, uint32_t) { + ret = static_cast<int>(buffer->data[0]); + }); port.close(); return ret; |