It needs to get some more testing. It appears to work fine, just
want to be a little cautious.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
add_slat_sample(td, io_u->ddir, slat_time);
}
add_slat_sample(td, io_u->ddir, slat_time);
}
void io_u_set_timeout(struct thread_data *td)
{
assert(td->cur_depth);
void io_u_set_timeout(struct thread_data *td)
{
assert(td->cur_depth);
setitimer(ITIMER_REAL, &td->timer, NULL);
fio_gettime(&td->timeout_end, NULL);
}
setitimer(ITIMER_REAL, &td->timer, NULL);
fio_gettime(&td->timeout_end, NULL);
}
+#else
+void io_u_set_timeout(struct thread_data fio_unused *td)
+{
+}
+#endif
static void io_u_timeout_handler(int fio_unused sig)
{
struct thread_data *td, *__td;
static void io_u_timeout_handler(int fio_unused sig)
{
struct thread_data *td, *__td;
td->error = ETIMEDOUT;
exit(1);
}
td->error = ETIMEDOUT;
exit(1);
}
void io_u_init_timeout(void)
{
void io_u_init_timeout(void)
{
signal(SIGALRM, io_u_timeout_handler);
signal(SIGALRM, io_u_timeout_handler);