| Issue |
240020
|
| Summary |
[libc] Implement clock_nanosleep in time
|
| Labels |
libc
|
| Assignees |
|
| Reporter |
amanmaurya92
|
### Summary
Implement standard POSIX function `clock_nanosleep` in `<time.h>`.
### Specification
POSIX.1-2024: https://pubs.opengroup.org/onlinepubs/9799919799/functions/clock_nanosleep.html
```c
int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp);
```
### Details
- Supports high-resolution thread sleeping with specified clock (e.g. `CLOCK_REALTIME`, `CLOCK_MONOTONIC`) and flags (`TIMER_ABSTIME`).
- Delegates directly to Linux `SYS_clock_nanosleep` / `SYS_clock_nanosleep_time64`.
- Add public declaration in `libc/include/time.yaml`, Linux implementation, entrypoints, and unit tests.
I would like to work on this issue.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs