[libc-commits] [PATCH] D148371: [libc] Add support to compile some syscalls on 32 bit platform
Michael Jones via Phabricator via libc-commits
libc-commits at lists.llvm.org
Fri Apr 14 14:43:34 PDT 2023
michaelrj added inline comments.
================
Comment at: libc/src/sys/wait/linux/wait.cpp:32
+ if (__llvm_libc::syscall_impl(SYS_waitid, P_ALL, 0, &info, WEXITED) == -1)
+ // TODO: what's the libc_errno here?
+ return -1;
----------------
it might be set by the extra argument for this syscall, the man page mentions that the syscall is slightly different from the function. I've pasted the text below since I can't find it online:
```
The raw waitid() system call takes a fifth argument, of type struct rusage *. If this argument is non-NULL,
then it is used to return resource usage information about the child, in the same manner as wait4(2). See
getrusage(2) for details.
```
Even if it ends up not being relevant to this specific implementation, it'd probably still be good to put a NULL on the end of the syscall.
================
Comment at: libc/src/sys/wait/linux/wait4.cpp:49
+#else
+#error "wait4 and waitpid syscalls not available."
+#endif
----------------
this list should include `waitid`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148371/new/
https://reviews.llvm.org/D148371
More information about the libc-commits
mailing list