Move td_* ddir defines
authorJens Axboe <jens.axboe@oracle.com>
Fri, 5 Jun 2009 20:10:51 +0000 (22:10 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Fri, 5 Jun 2009 20:10:51 +0000 (22:10 +0200)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fio.h
io_ddir.h

diff --git a/fio.h b/fio.h
index 771df35..7a4b9c6 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -413,12 +413,6 @@ extern int fio_gtod_cpu;
 
 extern struct thread_data *threads;
 
-#define td_read(td)            ((td)->o.td_ddir & TD_DDIR_READ)
-#define td_write(td)           ((td)->o.td_ddir & TD_DDIR_WRITE)
-#define td_rw(td)              (((td)->o.td_ddir & TD_DDIR_RW) == TD_DDIR_RW)
-#define td_random(td)          ((td)->o.td_ddir & TD_DDIR_RAND)
-#define file_randommap(td, f)  (!(td)->o.norandommap && (f)->file_map)
-
 static inline void fio_ro_check(struct thread_data *td, struct io_u *io_u)
 {
        assert(!(io_u->ddir == DDIR_WRITE && !td_write(td)));
index 3d9a205..d2ee40c 100644 (file)
--- a/io_ddir.h
+++ b/io_ddir.h
@@ -18,4 +18,10 @@ enum td_ddir {
        TD_DDIR_RANDRW          = TD_DDIR_RW | TD_DDIR_RAND,
 };
 
+#define td_read(td)            ((td)->o.td_ddir & TD_DDIR_READ)
+#define td_write(td)           ((td)->o.td_ddir & TD_DDIR_WRITE)
+#define td_rw(td)              (((td)->o.td_ddir & TD_DDIR_RW) == TD_DDIR_RW)
+#define td_random(td)          ((td)->o.td_ddir & TD_DDIR_RAND)
+#define file_randommap(td, f)  (!(td)->o.norandommap && (f)->file_map)
+
 #endif