]> git.ipfire.org Git - thirdparty/glibc.git/commit
mach: Add CLOCK_MONOTONIC case in clock_gettime()
authorZhaoming Luo <zhmingluo@163.com>
Mon, 6 Jan 2025 04:39:07 +0000 (12:39 +0800)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 12 Jan 2025 21:47:00 +0000 (22:47 +0100)
commit3782ffaf3e6c2a071df029b96712e596b5229838
treee50d8f1eaea004c0a84e8d32382a15de7b9245a8
parent73b854e955a3c38655fa51f742238dc7163b4a29
mach: Add CLOCK_MONOTONIC case in clock_gettime()

The Mach RPC host_get_uptime64() is implemented. It returns the elapsed time
value since bootup. See

https://git.savannah.gnu.org/cgit/hurd/gnumach.git/commit/?id=fc494bfe3fb6363e1077dc035eb119970d84a9d1

In this patch, the RPC is used to implement the monotonic clock for
mach.

* config.h.in: Add HAVE_HOST_GET_UPTIME64 config entry
* sysdeps/mach/clock_gettime.c: Add CLOCK_MONOTONIC case
* sysdeps/mach/configure: Check the existence of host_get_uptime64 RPC
* sysdeps/mach/configure.ac: Check the existence of host_get_uptime64 RPC

Message-ID: <20250106043907.1046-1-zhmingluo@163.com>
config.h.in
sysdeps/mach/clock_gettime.c
sysdeps/mach/configure
sysdeps/mach/configure.ac