genfio: Splitting gen_template in 2 parts
[fio.git] / gettime.c
index 660ba4c8864ddfbe1147fe84eb213e1309462bad..1a0f827460c9da6562678733f041be73c2eec484 100644 (file)
--- a/gettime.c
+++ b/gettime.c
@@ -25,7 +25,7 @@ struct tv_valid {
        int last_tv_valid;
 };
 #ifdef CONFIG_TLS_THREAD
-static struct tv_valid __thread static_tv_valid;
+static __thread struct tv_valid static_tv_valid;
 #else
 static pthread_key_t tv_tls_key;
 #endif
@@ -497,7 +497,8 @@ static void *clock_thread_fn(void *data)
                c->tsc = tsc;
        }
 
-       log_info("cs: cpu%3d: %lu clocks seen\n", t->cpu, t->entries[i - 1].tsc - t->entries[0].tsc);
+       log_info("cs: cpu%3d: %llu clocks seen\n", t->cpu,
+               (unsigned long long) t->entries[i - 1].tsc - t->entries[0].tsc);
 
        /*
         * The most common platform clock breakage is returning zero
@@ -577,7 +578,7 @@ int fio_monotonic_clocktest(void)
        free(threads);
 
        if (failed) {
-               log_err("Clocksource test: %u threads failed\n", failed);
+               log_err("Clocksource test: %lu threads failed\n", failed);
                goto err;
        }
 
@@ -594,9 +595,10 @@ int fio_monotonic_clocktest(void)
                if (prev->tsc > this->tsc) {
                        uint64_t diff = prev->tsc - this->tsc;
 
-                       log_info("cs: CPU clock mismatch (diff=%lu):\n", diff);
-                       log_info("\t CPU%3lu: TSC=%lu, SEQ=%lu\n", prev->cpu, prev->tsc, prev->seq);
-                       log_info("\t CPU%3lu: TSC=%lu, SEQ=%lu\n", this->cpu, this->tsc, this->seq);
+                       log_info("cs: CPU clock mismatch (diff=%llu):\n",
+                                               (unsigned long long) diff);
+                       log_info("\t CPU%3u: TSC=%llu, SEQ=%u\n", prev->cpu, (unsigned long long) prev->tsc, prev->seq);
+                       log_info("\t CPU%3u: TSC=%llu, SEQ=%u\n", this->cpu, (unsigned long long) this->tsc, this->seq);
                        failed++;
                }