X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=fio.c;h=af4c12cbe1815f7119511a6bdb44b39421c85161;hb=ab9461eaea21e861cc777aae2420db8f486ed1e2;hp=8a79ebed013e3a55f153a64939357a3382ba358a;hpb=71768568dc26de7ce31912e3a97305da8a7df36f;p=fio.git diff --git a/fio.c b/fio.c index 8a79ebed..af4c12cb 100644 --- a/fio.c +++ b/fio.c @@ -22,33 +22,14 @@ * */ #include -#include -#include -#include -#include -#include #include -#include #include -#include -#include -#include -#include -#include #include "fio.h" -#include "hash.h" #include "smalloc.h" -#include "verify.h" -#include "trim.h" -#include "diskutil.h" -#include "profile.h" -#include "lib/rand.h" -#include "memalign.h" -#include "server.h" -unsigned long page_mask; -unsigned long page_size; +uintptr_t page_mask; +uintptr_t page_size; static int endian_check(void) { @@ -64,10 +45,10 @@ static int endian_check(void) else if (u.c[0] == 0x12) le = 1; -#if defined(FIO_LITTLE_ENDIAN) +#if defined(CONFIG_LITTLE_ENDIAN) if (be) return 1; -#elif defined(FIO_BIG_ENDIAN) +#elif defined(CONFIG_BIG_ENDIAN) if (le) return 1; #else @@ -90,6 +71,10 @@ int main(int argc, char *argv[], char *envp[]) return 1; } +#if !defined(CONFIG_GETTIMEOFDAY) && !defined(CONFIG_CLOCK_GETTIME) +#error "No available clock source!" +#endif + arch_init(envp); sinit(); @@ -115,6 +100,8 @@ int main(int argc, char *argv[], char *envp[]) if (parse_options(argc, argv)) return 1; + fio_time_init(); + if (nr_clients) return fio_handle_clients(); else