From 331993e3fc3623f111d95796d3d7f30b4f6552c1 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sun, 21 Jul 2019 01:53:14 -0400 Subject: refactor thrd_sleep and nanosleep in terms of clock_nanosleep for namespace-safety with thrd_sleep, this requires an alias, which is also added. this eliminates all but one direct call point for nanosleep syscalls, and arranges that 64-bit time_t conversion logic will only need to exist in one file rather than three. as a bonus, clock_nanosleep with CLOCK_REALTIME and empty flags is now implemented as SYS_nanosleep, thereby working on older kernels that may lack POSIX clocks functionality. --- src/include/time.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/include') diff --git a/src/include/time.h b/src/include/time.h index 24c87973..cbabde47 100644 --- a/src/include/time.h +++ b/src/include/time.h @@ -4,6 +4,7 @@ #include "../../include/time.h" hidden int __clock_gettime(clockid_t, struct timespec *); +hidden int __clock_nanosleep(clockid_t, int, const struct timespec *, struct timespec *); hidden char *__asctime_r(const struct tm *, char *); hidden struct tm *__gmtime_r(const time_t *restrict, struct tm *restrict); -- cgit v1.2.1