diff options
author | Lukas Larsson <[email protected]> | 2014-11-03 11:32:01 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2015-04-13 15:59:22 +0200 |
commit | e6d3da55a2fe06730f3b92098ff8c13e16e3254b (patch) | |
tree | 68f8ced6767f0b0f69514ea57c1d4805455f836f /erts/configure.in | |
parent | 6e3e48d39a77aa18b92fb048d6a910baa71badf3 (diff) | |
download | otp-e6d3da55a2fe06730f3b92098ff8c13e16e3254b.tar.gz otp-e6d3da55a2fe06730f3b92098ff8c13e16e3254b.tar.bz2 otp-e6d3da55a2fe06730f3b92098ff8c13e16e3254b.zip |
erts: Add high accuracy poll timeouts
Different poll/select implementations have different ways
to handle timeouts of < ms accuracy. Most have extended
API like pselect or such, while others rely on using
timerfds (epoll_wait). If no high accuracy timeout is
available, we simply round up to nearest ms. If we do not
roundup we will spin the last ms when waiting for a timeout
which is not desirable.
Diffstat (limited to 'erts/configure.in')
-rw-r--r-- | erts/configure.in | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/erts/configure.in b/erts/configure.in index 481dfe405e..2699ab6f29 100644 --- a/erts/configure.in +++ b/erts/configure.in @@ -1768,6 +1768,10 @@ AC_CHECK_HEADER(sys/event.h, have_kernel_poll=kqueue) AC_CHECK_HEADER(sys/epoll.h, have_kernel_poll=epoll) AC_CHECK_HEADER(sys/devpoll.h, have_kernel_poll=/dev/poll) +dnl Check if we have timerfds to be used for high accuracy +dnl epoll_wait timeouts +AC_CHECK_HEADERS([sys/timerfd.h]) + dnl Check for kernel SCTP support AC_SUBST(LIBSCTP) if test "x$enable_sctp" != "xno" ; then @@ -2113,7 +2117,7 @@ AC_CHECK_FUNCS([ieee_handler fpsetmask finite isnan isinf res_gethostbyname dlop gethrtime localtime_r gmtime_r inet_pton \ memcpy mallopt sbrk _sbrk __sbrk brk _brk __brk \ flockfile fstat strlcpy strlcat setsid posix2time time2posix \ - setlocale nl_langinfo poll mlockall]) + setlocale nl_langinfo poll mlockall ppoll]) AC_MSG_CHECKING([for isfinite]) AC_TRY_LINK([#include <math.h>], |