4 Commits

Author SHA1 Message Date
Michael Jones
f0a3954ef1 [libc][cleanup] Fix most conversion warnings
This patch is large, but is almost entirely just adding casts to calls
to syscall_impl. Much of the work was done programatically, with human
checking when the syntax or types got confusing.

Reviewed By: mcgrathr

Differential Revision: https://reviews.llvm.org/D156950
2023-08-07 15:03:01 -07:00
Mikhail R. Gadelha
c9783d2bda [libc] Add support to compile some syscalls on 32 bit platform
This patch adds a bunch of ifdefs to handle the 32 bit versions of
some syscalls, which often only append a 64 to the name of the syscall
(with exception of SYS_lseek -> SYS_llseek and SYS_futex ->
SYS_futex_time64)

This patch also tries to handle cases where wait4 is not available
(as in riscv32): to implement wait, wait4 and waitpid when wait4 is
not available, we check for alternative wait calls and ultimately rely
on waitid to implement them all.

In riscv32, only waitid is available, so we need it to support this
platform.

Reviewed By: michaelrj

Differential Revision: https://reviews.llvm.org/D148371
2023-08-03 10:08:01 -03:00
Siva Chandra Reddy
204587a3cb [libc][NFC] Switch use of errno in src/unistd and src/sys to libc_errno.
Reviewed By: lntue

Differential Revision: https://reviews.llvm.org/D145096
2023-03-02 17:15:10 +00:00
Siva Chandra Reddy
be4e425758 [libc] Add select.h and the implementation of the select function for Linux.
Reviewed By: michaelrj

Differential Revision: https://reviews.llvm.org/D136375
2022-10-22 03:17:48 +00:00