[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 13:21:15 PDT 2023
mikhail.ramalho created this revision.
mikhail.ramalho added reviewers: michaelrj, sivachandra.
Herald added subscribers: libc-commits, asb, ecnelises, tschuett, s.egerton, PkmX, simoncook, arichardson.
Herald added projects: libc-project, All.
mikhail.ramalho requested review of this revision.
Herald added a subscriber: pcwang-thead.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D148371
Files:
libc/src/__support/File/linux_file.cpp
libc/src/__support/threads/linux/mutex.h
libc/src/sys/sendfile/linux/sendfile.cpp
libc/src/sys/wait/linux/wait.cpp
libc/src/sys/wait/linux/wait4.cpp
libc/src/sys/wait/linux/waitpid.cpp
libc/src/unistd/linux/dup2.cpp
libc/src/unistd/linux/ftruncate.cpp
libc/src/unistd/linux/lseek.cpp
libc/src/unistd/linux/truncate.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148371.513724.patch
Type: text/x-patch
Size: 10764 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230414/f058fae7/attachment.bin>
More information about the libc-commits
mailing list