From: Daniel Gollub Date: Wed, 30 Apr 2014 09:25:04 +0000 (+0200) Subject: Rename time.h for third-party include of fio.h X-Git-Tag: fio-2.1.9~9 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=ef3c94b62e3f58cc23c3ad50450150c8474b4285;hp=57e2bbcbc3c2b534931d27d41086f5bab0c9c63a Rename time.h for third-party include of fio.h External project might build external ioengines and need to include there for fio.h. If a project set the include path to the fio root source directory and the third-party source holds an "time.h" as well things get complicated. Signed-off-by: Daniel Gollub Cc: Daniel Gollub Signed-off-by: Jens Axboe --- diff --git a/fio.h b/fio.h index 9eecba36..ed034cbb 100644 --- a/fio.h +++ b/fio.h @@ -30,7 +30,7 @@ #include "helpers.h" #include "options.h" #include "profile.h" -#include "time.h" +#include "fio_time.h" #include "gettime.h" #include "lib/getopt.h" #include "lib/rand.h" diff --git a/fio_time.h b/fio_time.h new file mode 100644 index 00000000..c550a55b --- /dev/null +++ b/fio_time.h @@ -0,0 +1,19 @@ +#ifndef FIO_TIME_H +#define FIO_TIME_H + +extern uint64_t utime_since(struct timeval *, struct timeval *); +extern uint64_t utime_since_now(struct timeval *); +extern uint64_t mtime_since(struct timeval *, struct timeval *); +extern uint64_t mtime_since_now(struct timeval *); +extern uint64_t time_since_now(struct timeval *); +extern uint64_t mtime_since_genesis(void); +extern uint64_t utime_since_genesis(void); +extern void usec_spin(unsigned int); +extern void usec_sleep(struct thread_data *, unsigned long); +extern void fill_start_time(struct timeval *); +extern void set_genesis_time(void); +extern int ramp_time_over(struct thread_data *); +extern int in_ramp_time(struct thread_data *); +extern void fio_time_init(void); + +#endif diff --git a/mutex.c b/mutex.c index 466e20ed..9d10c2ce 100644 --- a/mutex.c +++ b/mutex.c @@ -15,7 +15,7 @@ #include "arch/arch.h" #include "os/os.h" #include "helpers.h" -#include "time.h" +#include "fio_time.h" #include "gettime.h" void fio_mutex_remove(struct fio_mutex *mutex) diff --git a/time.h b/time.h deleted file mode 100644 index c550a55b..00000000 --- a/time.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef FIO_TIME_H -#define FIO_TIME_H - -extern uint64_t utime_since(struct timeval *, struct timeval *); -extern uint64_t utime_since_now(struct timeval *); -extern uint64_t mtime_since(struct timeval *, struct timeval *); -extern uint64_t mtime_since_now(struct timeval *); -extern uint64_t time_since_now(struct timeval *); -extern uint64_t mtime_since_genesis(void); -extern uint64_t utime_since_genesis(void); -extern void usec_spin(unsigned int); -extern void usec_sleep(struct thread_data *, unsigned long); -extern void fill_start_time(struct timeval *); -extern void set_genesis_time(void); -extern int ramp_time_over(struct thread_data *); -extern int in_ramp_time(struct thread_data *); -extern void fio_time_init(void); - -#endif