#include "fio.h"
#include "smalloc.h"
-struct timeval *fio_tv;
+struct timeval *fio_tv = NULL;
int fio_gtod_offload = 0;
int fio_gtod_cpu = -1;
static pthread_t gtod_thread;
void fio_gtod_init(void)
{
fio_tv = smalloc(sizeof(struct timeval));
- assert(fio_tv);
+ if (!fio_tv)
+ log_err("fio: smalloc pool exhausted\n");
}
static void fio_gtod_update(void)
{
- gettimeofday(fio_tv, NULL);
+ if (fio_tv)
+ gettimeofday(fio_tv, NULL);
}
static void *gtod_thread_main(void *data)