aboutsummaryrefslogtreecommitdiff
path: root/libc/src/stdlib/gpu/system.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/stdlib/gpu/system.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/stdlib/gpu/system.cpp')
-rw-r--r--libc/src/stdlib/gpu/system.cpp5
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;