aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2015-05-08 17:47:27 +0200
committerRickard Green <[email protected]>2015-05-08 17:47:27 +0200
commitcc03bb892c4ecf2344234d4f7b1b49133d782f41 (patch)
treea68976350b73526dfe37fe4ad4384226c1652782 /erts/emulator/sys
parent207346e0543143bf1aea11a93bcb24de170fc0ac (diff)
parent9c78f149517dc02457d4c59e90bc9b03d411e28c (diff)
downloadotp-cc03bb892c4ecf2344234d4f7b1b49133d782f41.tar.gz
otp-cc03bb892c4ecf2344234d4f7b1b49133d782f41.tar.bz2
otp-cc03bb892c4ecf2344234d4f7b1b49133d782f41.zip
Merge branch 'rickard/timer-optimization/OTP-12650'
* rickard/timer-optimization/OTP-12650: Optimized timer implementation Reusable red-black tree implementation Conflicts: erts/emulator/beam/erl_bif_timer.c
Diffstat (limited to 'erts/emulator/sys')
-rw-r--r--erts/emulator/sys/common/erl_check_io.c5
-rw-r--r--erts/emulator/sys/common/erl_poll.c2
-rw-r--r--erts/emulator/sys/ose/erl_poll.c2
-rw-r--r--erts/emulator/sys/win32/erl_poll.c2
4 files changed, 6 insertions, 5 deletions
diff --git a/erts/emulator/sys/common/erl_check_io.c b/erts/emulator/sys/common/erl_check_io.c
index 7be17d20bb..d1d6696090 100644
--- a/erts/emulator/sys/common/erl_check_io.c
+++ b/erts/emulator/sys/common/erl_check_io.c
@@ -38,6 +38,8 @@
#include "erl_check_io.h"
#include "erl_thr_progress.h"
#include "dtrace-wrapper.h"
+#define ERTS_WANT_TIMER_WHEEL_API
+#include "erl_time.h"
#ifdef ERTS_SYS_CONTINOUS_FD_NUMBERS
#else
@@ -1616,8 +1618,7 @@ ERTS_CIO_EXPORT(erts_check_io)(int do_wait)
/* Figure out timeout value */
timeout_time = (do_wait
- ? erts_check_next_timeout_time(esdp->timer_wheel,
- ERTS_SEC_TO_MONOTONIC(10*60))
+ ? erts_check_next_timeout_time(esdp)
: ERTS_POLL_NO_TIMEOUT /* poll only */);
/*
diff --git a/erts/emulator/sys/common/erl_poll.c b/erts/emulator/sys/common/erl_poll.c
index f4d4a85ca4..446cca77ff 100644
--- a/erts/emulator/sys/common/erl_poll.c
+++ b/erts/emulator/sys/common/erl_poll.c
@@ -2026,7 +2026,7 @@ get_timeout(ErtsPollSet ps,
}
else {
ErtsMonotonicTime diff_time, current_time;
- current_time = erts_get_monotonic_time();
+ current_time = erts_get_monotonic_time(NULL);
diff_time = timeout_time - current_time;
if (diff_time <= 0) {
save_timeout_time = ERTS_MONOTONIC_TIME_MIN;
diff --git a/erts/emulator/sys/ose/erl_poll.c b/erts/emulator/sys/ose/erl_poll.c
index 36ee2557e8..3d4ac0365f 100644
--- a/erts/emulator/sys/ose/erl_poll.c
+++ b/erts/emulator/sys/ose/erl_poll.c
@@ -506,7 +506,7 @@ int erts_poll_wait(ErtsPollSet ps,
}
else {
ErtsMonotonicTime current_time, diff_time;
- current_time = erts_get_monotonic_time();
+ current_time = erts_get_monotonic_time(NULL);
diff_time = timeout_time - current_time;
if (diff_time <= 0)
goto no_timeout;
diff --git a/erts/emulator/sys/win32/erl_poll.c b/erts/emulator/sys/win32/erl_poll.c
index 937a678702..9196561944 100644
--- a/erts/emulator/sys/win32/erl_poll.c
+++ b/erts/emulator/sys/win32/erl_poll.c
@@ -454,7 +454,7 @@ poll_wait_timeout(ErtsPollSet ps, ErtsMonotonicTime timeout_time)
return (DWORD) 0;
}
- current_time = erts_get_monotonic_time();
+ current_time = erts_get_monotonic_time(NULL);
diff_time = timeout_time - current_time;
if (diff_time <= 0)
goto no_timeout;