}
#endif
-#ifdef CONFIG_PTHREAD_CONDATTR_SETCLOCK
- clock_gettime(CLOCK_MONOTONIC, &ts);
-#else
- clock_gettime(CLOCK_REALTIME, &ts);
-#endif
+ fio_get_mono_time(&ts);
memcpy(&last_du, &ts, sizeof(ts));
memcpy(&last_ss, &ts, sizeof(ts));
memcpy(&last_si, &ts, sizeof(ts));
FD_SET(hd->pipe[0], &rfds);
FD_ZERO(&efds);
FD_SET(hd->pipe[0], &efds);
- ret = select(1, &rfds, NULL, &efds, &timeout);
- if (ret < 0)
+ if (select(1, &rfds, NULL, &efds, &timeout) < 0) {
log_err("fio: select() call in helper thread failed: %s",
strerror(errno));
+ ret = 1;
+ }
if (read_from_pipe(hd->pipe[0], &action, sizeof(action)) <
0)
action = 0;
}
-#ifdef CONFIG_PTHREAD_CONDATTR_SETCLOCK
- clock_gettime(CLOCK_MONOTONIC, &ts);
-#else
- clock_gettime(CLOCK_REALTIME, &ts);
-#endif
+ fio_get_mono_time(&ts);
if (action == A_RESET) {
last_du = ts;