aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2016-04-01 20:18:51 +0200
committerErlang/OTP <[email protected]>2016-04-01 20:18:51 +0200
commitc81d11d2affc2675d37ff0f64bbdc866453a71df (patch)
treeedb4ce53e4d06c3bfcae2a4d5ebbbce44febb4b0 /erts
parent339fb4277e49caa4473a28ab037702441979f207 (diff)
parentc17eec673d8e7761712e3a4bfc520e9aea5e74c8 (diff)
downloadotp-c81d11d2affc2675d37ff0f64bbdc866453a71df.tar.gz
otp-c81d11d2affc2675d37ff0f64bbdc866453a71df.tar.bz2
otp-c81d11d2affc2675d37ff0f64bbdc866453a71df.zip
Merge branch 'rickard/ethr-event-futex-wait-timeout/OTP-13420' into maint-18
* rickard/ethr-event-futex-wait-timeout/OTP-13420: Fix premature timeouts for ethread events on Linux
Diffstat (limited to 'erts')
-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) {