aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys/common/erl_poll.h
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2015-05-11 16:10:51 +0200
committerBjörn-Egil Dahlberg <[email protected]>2015-05-11 16:10:51 +0200
commit718784e57e19849445e18f1a95830da5e920d287 (patch)
treee488abc4189ef41825893d84672b5439fe051229 /erts/emulator/sys/common/erl_poll.h
parentd8f6982b9661eca009fa612d3184088ce1cbb469 (diff)
parente6d3da55a2fe06730f3b92098ff8c13e16e3254b (diff)
downloadotp-718784e57e19849445e18f1a95830da5e920d287.tar.gz
otp-718784e57e19849445e18f1a95830da5e920d287.tar.bz2
otp-718784e57e19849445e18f1a95830da5e920d287.zip
Merge branch 'egil/erts/high_accuracy_sleep/OTP-12236'
* egil/erts/high_accuracy_sleep/OTP-12236: erts: Add high accuracy poll timeouts
Diffstat (limited to 'erts/emulator/sys/common/erl_poll.h')
-rw-r--r--erts/emulator/sys/common/erl_poll.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/erts/emulator/sys/common/erl_poll.h b/erts/emulator/sys/common/erl_poll.h
index d02ed2396b..ae2d063805 100644
--- a/erts/emulator/sys/common/erl_poll.h
+++ b/erts/emulator/sys/common/erl_poll.h
@@ -98,6 +98,8 @@
# endif
#endif
+#define ERTS_POLL_USE_TIMERFD 0
+
typedef Uint32 ErtsPollEvents;
#undef ERTS_POLL_EV_E2N
@@ -130,6 +132,12 @@ struct erts_sys_fd_type {
#include <sys/epoll.h>
+#ifdef HAVE_SYS_TIMERFD_H
+#include <sys/timerfd.h>
+#undef ERTS_POLL_USE_TIMERFD
+#define ERTS_POLL_USE_TIMERFD 1
+#endif
+
#define ERTS_POLL_EV_E2N(EV) \
((__uint32_t) (EV))
#define ERTS_POLL_EV_N2E(EV) \