Refactor nanosleep in terms of clock_nanosleep

System Internals / glibc - Adhemerval Zanella [linaro.org] - 6 November 2019 17:47 EST

The generic version is straightforward. For Hurd, its nanosleep implementation is moved to clock_nanosleep with adjustments from generic unix implementation.

The generic clock_nanosleep unix version is also removed since it calls nanosleep.

Checked on x86_64-linux-gnu and powerpc64le-linux-gnu.

3537ecb49c Refactor nanosleep in terms of clock_nanosleep
include/time.h | 3 ++
posix/nanosleep.c | 13 +++--
sysdeps/{unix => mach}/clock_nanosleep.c | 67 ++++++++++++++++++--------
sysdeps/mach/nanosleep.c | 79 -------------------------------
sysdeps/unix/sysv/linux/clock_nanosleep.c | 2 +-
sysdeps/unix/sysv/linux/nanosleep.c | 31 ------------
time/clock_nanosleep.c | 2 +-
7 files changed, 59 insertions(+), 138 deletions(-)

Upstream: sourceware.org


  • Share