aboutsummaryrefslogtreecommitdiff
path: root/libc/src/stdio/gpu/feof.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/feof.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/feof.cpp')
-rw-r--r--libc/src/stdio/gpu/feof.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/libc/src/stdio/gpu/feof.cpp b/libc/src/stdio/gpu/feof.cpp
index 4a8a173..02adb4c 100644
--- a/libc/src/stdio/gpu/feof.cpp
+++ b/libc/src/stdio/gpu/feof.cpp
@@ -18,8 +18,12 @@ LLVM_LIBC_FUNCTION(int, feof, (::FILE * stream)) {
int ret;
rpc::Client::Port port = rpc::client.open<RPC_FEOF>();
port.send_and_recv(
- [=](rpc::Buffer *buffer) { buffer->data[0] = file::from_stream(stream); },
- [&](rpc::Buffer *buffer) { ret = static_cast<int>(buffer->data[0]); });
+ [=](rpc::Buffer *buffer, uint32_t) {
+ buffer->data[0] = file::from_stream(stream);
+ },
+ [&](rpc::Buffer *buffer, uint32_t) {
+ ret = static_cast<int>(buffer->data[0]);
+ });
port.close();
return ret;
}