aboutsummaryrefslogtreecommitdiffstats
path: root/erts/lib_src
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2016-03-16 17:17:11 +0100
committerRickard Green <[email protected]>2016-03-16 17:19:39 +0100
commitc17eec673d8e7761712e3a4bfc520e9aea5e74c8 (patch)
tree093bcb61d2f692ddb06c76142d7b86be354731f1 /erts/lib_src
parent5e1b5ef47f3f2b898d30e0425823835bd9a574d4 (diff)
downloadotp-c17eec673d8e7761712e3a4bfc520e9aea5e74c8.tar.gz
otp-c17eec673d8e7761712e3a4bfc520e9aea5e74c8.tar.bz2
otp-c17eec673d8e7761712e3a4bfc520e9aea5e74c8.zip
Fix premature timeouts for ethread events on Linux
Diffstat (limited to 'erts/lib_src')
-rw-r--r--erts/lib_src/pthread/ethr_event.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/lib_src/pthread/ethr_event.c b/erts/lib_src/pthread/ethr_event.c
index 0629b4dfcd..69e7be342c 100644
--- a/erts/lib_src/pthread/ethr_event.c
+++ b/erts/lib_src/pthread/ethr_event.c
@@ -94,6 +94,9 @@ wait__(ethr_event *e, int spincount, ethr_sint64_t timeout)
tsp = NULL;
}
else {
+#ifdef ETHR_HAVE_ETHR_GET_MONOTONIC_TIME
+ start = ethr_get_monotonic_time();
+#endif
tsp = &ts;
time = timeout;
if (spincount == 0) {
@@ -102,9 +105,6 @@ wait__(ethr_event *e, int spincount, ethr_sint64_t timeout)
goto return_event_on;
goto set_timeout;
}
-#ifdef ETHR_HAVE_ETHR_GET_MONOTONIC_TIME
- start = ethr_get_monotonic_time();
-#endif
}
while (1) {