[libc-commits] [PATCH] D148371: [libc] Add support to compile some syscalls on 32 bit platform

Mikhail Ramalho via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Apr 14 16:31:10 PDT 2023


mikhail.ramalho marked 2 inline comments as done.
mikhail.ramalho 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;
----------------
michaelrj wrote:
> 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.
Thanks! This actually simplifies the code!


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