summaryrefslogtreecommitdiff
path: root/libc/src/time/linux/time.cpp
AgeCommit message (Collapse)Author
2024-12-05Reapply "[libc][windows] start time API implementation (#117775)" (#118886)Schrodinger ZHU Yifan
2024-12-05Revert "[libc][windows] start time API implementation (#117775)"Joseph Huber
This reverts commit 0adff0af20c7d9bae8bd8bdf402506c10369ead1. Breaks the GPU build
2024-12-05[libc][windows] start time API implementation (#117775)Schrodinger ZHU Yifan
Add a `clock_gettime` emulation layer and use it to implement the `time` entrypoint. For windows, the monotonic clock is emulated using `QPC`. The realtime clock is emulated using `GetSystemTimePreciseAsFileTime`.
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.
2024-05-10Reland "[libc][NFC] adjust time related implementations"" (#91687)Schrodinger ZHU Yifan
Reverts llvm/llvm-project#91657 and Relands #91485
2024-05-09Revert "[libc][NFC] adjust time related implementations" (#91657)Schrodinger ZHU Yifan
Reverts llvm/llvm-project#91485. It breaks GPU and fuchisa.
2024-05-09[libc][NFC] adjust time related implementations (#91485)Schrodinger ZHU Yifan
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-09-08[libc] Unify gettime implementations (#65383)Mikhail R. Gadelha
Similar to D159208, this patch unifies the calls to a syscall, in this patch it is the syscall SYS_clock_gettime/SYS_clock_gettime64. This patch also fixes calls to SYS_clock_gettime64 by creating a timespec64 object, passing it to the syscall and rewriting the timespec given by the caller with timespec64 object's contents. This fixes cases where timespec has a 4 bytes long time_t member, but SYS_clock_gettime is not available (e.g., rv32).
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-08-03[libc] Add support to compile some syscalls on 32 bit platformMikhail R. Gadelha
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-03-02[libc][NFC] Switch use of errno in src/time and test/src/time to libc_errno.Raman Tenneti
Switch use of errno in src/time and test/src/time to libc_errno. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D145192
2022-10-25[libc] Add Linux implementations of time and clock functions.Siva Chandra Reddy
Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D136666