mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Add support for new clocks.
Recent Linux kernels added support for the CLOCK_MONOTONIC_RAW, CLOCK_REALTIME_COARSE, and CLOCK_MONOTONIC_COARSE clocks.
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/* clock_getres -- Get the resolution of a POSIX clockid_t. Linux version.
|
||||
Copyright (C) 2003,2004,2005,2006, 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 2003,2004,2005,2006,2008,2010 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -44,6 +44,9 @@
|
||||
SYSDEP_GETRES_CPUTIME \
|
||||
case CLOCK_REALTIME: \
|
||||
case CLOCK_MONOTONIC: \
|
||||
case CLOCK_MONOTONIC_RAW: \
|
||||
case CLOCK_REALTIME_COARSE: \
|
||||
case CLOCK_MONOTONIC_COARSE: \
|
||||
SYSCALL_GETRES
|
||||
|
||||
# define __libc_missing_posix_timers 0
|
||||
@ -80,6 +83,9 @@ maybe_syscall_getres (clockid_t clock_id, struct timespec *res)
|
||||
SYSDEP_GETRES_CPUTIME \
|
||||
case CLOCK_REALTIME: \
|
||||
case CLOCK_MONOTONIC: \
|
||||
case CLOCK_MONOTONIC_RAW: \
|
||||
case CLOCK_REALTIME_COARSE: \
|
||||
case CLOCK_MONOTONIC_COARSE: \
|
||||
retval = maybe_syscall_getres (clock_id, res); \
|
||||
if (retval == 0) \
|
||||
break; \
|
||||
|
Reference in New Issue
Block a user