projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Thread waitpid() error check
[fio.git]
/
io_u.c
diff --git
a/io_u.c
b/io_u.c
index 4f17decd4ca8002133f6f84d66192f506e520d92..c93896001296419f1a348f2b5f9f46f660b0a366 100644
(file)
--- 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);
}
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);
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);
}
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;
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);
}
td->error = ETIMEDOUT;
exit(1);
}
+#endif
void io_u_init_timeout(void)
{
void io_u_init_timeout(void)
{
+#ifdef FIO_USE_TIMEOUT
signal(SIGALRM, io_u_timeout_handler);
signal(SIGALRM, io_u_timeout_handler);
+#endif
}
}