X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=io_u.c;h=c93896001296419f1a348f2b5f9f46f660b0a366;hp=4f17decd4ca8002133f6f84d66192f506e520d92;hb=50070b5a3b37f013a2b0b968e1b8b34bffff8589;hpb=433afcb4fe81e775c15af9d39a6f4db8a53d693a diff --git a/io_u.c b/io_u.c index 4f17decd..c9389600 100644 --- a/io_u.c +++ b/io_u.c @@ -583,6 +583,7 @@ void io_u_queued(struct thread_data *td, struct io_u *io_u) add_slat_sample(td, io_u->ddir, slat_time); } +#ifdef FIO_USE_TIMEOUT void io_u_set_timeout(struct thread_data *td) { assert(td->cur_depth); @@ -594,7 +595,13 @@ void io_u_set_timeout(struct thread_data *td) 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 +#ifdef FIO_USE_TIMEOUT static void io_u_timeout_handler(int fio_unused sig) { struct thread_data *td, *__td; @@ -628,8 +635,11 @@ static void io_u_timeout_handler(int fio_unused sig) td->error = ETIMEDOUT; exit(1); } +#endif void io_u_init_timeout(void) { +#ifdef FIO_USE_TIMEOUT signal(SIGALRM, io_u_timeout_handler); +#endif }