gettime-thread: fix missing startup mutex
authorJens Axboe <axboe@fb.com>
Wed, 17 Dec 2014 02:49:54 +0000 (19:49 -0700)
committerJens Axboe <axboe@fb.com>
Wed, 17 Dec 2014 02:49:54 +0000 (19:49 -0700)
It'll segfault if gtod_cpu= is used, ensure we pass in the mutex.

Signed-off-by: Jens Axboe <axboe@fb.com>
gettime-thread.c

index 72cc4d8..95f35c3 100644 (file)
@@ -63,7 +63,7 @@ int fio_start_gtod_thread(void)
 
        pthread_attr_init(&attr);
        pthread_attr_setstacksize(&attr, PTHREAD_STACK_MIN);
-       ret = pthread_create(&gtod_thread, &attr, gtod_thread_main, NULL);
+       ret = pthread_create(&gtod_thread, &attr, gtod_thread_main, mutex);
        pthread_attr_destroy(&attr);
        if (ret) {
                log_err("Can't create gtod thread: %s\n", strerror(ret));