diff options
author | David Lamparter <equinox@diac24.net> | 2021-04-13 20:49:26 +0200 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2021-06-24 16:42:59 +0200 |
commit | 6418e2d34273256a7f9fae71dff92a96403101ff (patch) | |
tree | 6685ab840ff252a8d78a8aa8af488ea14c2c01fe /configure.ac | |
parent | lib: make cputime checks runtime options (v2) (diff) | |
download | frr-6418e2d34273256a7f9fae71dff92a96403101ff.tar.xz frr-6418e2d34273256a7f9fae71dff92a96403101ff.zip |
lib: try CLOCK_THREAD_CPUTIME_ID
This might be faster if at some point in the future the Linux vDSO
supports CLOCK_THREAD_CPUTIME_ID without making a syscall. (Same
applies for other OSes.)
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 9ba95fe98..0ea209bbf 100644 --- a/configure.ac +++ b/configure.ac @@ -2229,6 +2229,10 @@ AC_CHECK_DECL([CLOCK_MONOTONIC], AC_DEFINE([HAVE_CLOCK_MONOTONIC], [1], [Have monotonic clock]) ], [AC_MSG_RESULT([no])], [FRR_INCLUDES]) +AC_CHECK_DECL([CLOCK_THREAD_CPUTIME_ID], [ + AC_DEFINE([HAVE_CLOCK_THREAD_CPUTIME_ID], [1], [Have cpu-time clock]) +], [AC_MSG_RESULT([no])], [FRR_INCLUDES]) + AC_SEARCH_LIBS([clock_nanosleep], [rt], [ AC_DEFINE([HAVE_CLOCK_NANOSLEEP], [1], [Have clock_nanosleep()]) ]) |