X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=gettime-thread.c;h=fc52236bf5969028aabec5c0507f445e91298d65;hp=cbb81dc83e9ff3c7f427e071161b92f016c1b9d1;hb=7ff0297f39d0dea72a9b004393ca3c5e5f397760;hpb=e6fe02651641fc64d2fa4fcfe9b1013b2947d11b diff --git a/gettime-thread.c b/gettime-thread.c index cbb81dc8..fc52236b 100644 --- a/gettime-thread.c +++ b/gettime-thread.c @@ -42,10 +42,17 @@ struct gtod_cpu_data { static void *gtod_thread_main(void *data) { struct fio_mutex *mutex = data; + int ret; + + ret = fio_setaffinity(gettid(), fio_gtod_cpumask); - fio_setaffinity(gettid(), fio_gtod_cpumask); fio_mutex_up(mutex); + if (ret == -1) { + log_err("gtod: setaffinity failed\n"); + return NULL; + } + /* * As long as we have jobs around, update the clock. It would be nice * to have some way of NOT hammering that CPU with gettimeofday(),