X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=gettime-thread.c;h=2dc976fb42c7bbb5b4deedc0746d5577bd5c1e0b;hb=e51a662940b8a24d2c1430bfe003423297171680;hp=73632d0b35675510a9edd2a8c52cf0f15bec71e2;hpb=79c896a122a7a39b840257215e622bdeff8272f1;p=fio.git diff --git a/gettime-thread.c b/gettime-thread.c index 73632d0b..2dc976fb 100644 --- a/gettime-thread.c +++ b/gettime-thread.c @@ -8,8 +8,10 @@ struct timeval *fio_tv = NULL; int fio_gtod_offload = 0; -static os_cpu_mask_t fio_gtod_cpumask; static pthread_t gtod_thread; +#ifdef FIO_HAVE_CPU_AFFINITY +static os_cpu_mask_t fio_gtod_cpumask; +#endif void fio_gtod_init(void) { @@ -95,5 +97,7 @@ err: void fio_gtod_set_cpu(unsigned int cpu) { +#ifdef FIO_HAVE_CPU_AFFINITY fio_cpu_set(&fio_gtod_cpumask, cpu); +#endif }