X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=gettime-thread.c;h=fc52236bf5969028aabec5c0507f445e91298d65;hp=cbb81dc83e9ff3c7f427e071161b92f016c1b9d1;hb=9b50942ecec9c79fa82050c503fe313cfd87ac96;hpb=22bcb265833f263facd58bcef3d8a159c554460e 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(),