summaryrefslogtreecommitdiff
path: root/libc/src/unistd/linux/fork.cpp
AgeCommit message (Collapse)Author
2025-06-11[libc] Move libc_errno.h to libc/src/__support and make ↵lntue
LIBC_ERRNO_MODE_SYSTEM to be header-only. (#143187) This is the first step in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2024-08-02[libc] add simplified tid cache (#101620)Schrodinger ZHU Yifan
According to discussions on monthly meeting, we probably don't want to cache `getpid` anymore. glibc removes their cache. bionic is hesitating whether such cache is to be removed. `getpid` is async-signal-safe, so we must make sure it always work. However, for `gettid`, we have more freedom. Moreover, we are using `gettid` to examine deadlock such that the performance penalty is not negligible here. Thus, this patch is separated from previous patch to provide only `tid` caching. It is much more simplified. Hopefully, previous build issues can be resolved easily.
2024-07-27revert all tid changes (#100915)Schrodinger ZHU Yifan
2024-07-20reland "[libc] implement cached process/thread identity (#98989)" (#99765)Schrodinger ZHU Yifan
2024-07-18Revert "[libc] implement cached process/thread identity" (#99559)Schrodinger ZHU Yifan
Reverts llvm/llvm-project#98989
2024-07-18[libc] implement cached process/thread identity (#98989)Schrodinger ZHU Yifan
migrated from https://github.com/llvm/llvm-project/pull/95965 due to corrupted git history
2024-07-12[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597)Petr Hosek
This is a part of #97655.
2024-07-12Revert "[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace ↵Mehdi Amini
declaration" (#98593) Reverts llvm/llvm-project#98075 bots are broken
2024-07-11[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98075)Petr Hosek
This is a part of #97655.
2023-09-26[libc] Mass replace enclosing namespace (#67032)Guillaume Chatelet
This is step 4 of https://discourse.llvm.org/t/rfc-customizable-namespace-to-allow-testing-the-libc-when-the-system-libc-is-also-llvms-libc/73079
2023-08-07[libc][cleanup] Fix most conversion warningsMichael Jones
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-04-17[libc][NFC] Standardize missing syscalls error messages.Mikhail R. Gadelha
This patch standardizes the error messages when a syscall is not available to be in the format: "ABC and DEF syscalls are not available." Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D148373
2023-03-16[libc] Enable __llvm_libc_syscall and forkMikhail R. Gadelha
This patch enables the remaining calls from unistd. The test cases had to be updated to: 1. Use SYS_symlinkat if SYS_symlink is not available 2. Use SYS_readlinkat if SYS_readlink is not available 3. Use SYS_unlinkat if SYS_unlink is not available 4. Use SYS_openat if SYS_open is not available We also abort compilation if neither of the syscalls mentioned above are available. Differential Revision: https://reviews.llvm.org/D146161
2023-03-02[libc][obvious] Fix errno includes in unistdMichael Jones
Minor typo swapped quotes for angle brackets. This patch moves everything to quotes. Differential Revision: https://reviews.llvm.org/D145188
2023-03-02[libc][NFC] Switch use of errno in src/unistd and src/sys to libc_errno.Siva Chandra Reddy
Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D145096
2022-11-11[libc] move fork into threads folderMichael Jones
Fork, as a thread function, should go in the threads folder. Additionally, it depends on the thread mutex, and it was causing build issues for targets where we don't support threads. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D137867
2022-10-10[libc] Add implementation of pthread_atfork.Siva Chandra Reddy
Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D135432
2022-10-04[libc] Add a minimal implementation of the POSIX fork function.Siva Chandra Reddy
A very simple and minimal implementation of fork is added. Future changes will add more functionality to satisfy POSIX and Linux requirements. An implementation of wait and a few support macros in sys/wait.h have also been added to help with testing the fork function. Reviewed By: lntue, michaelrj Differential Revision: https://reviews.llvm.org/D135131