From: Jens Axboe Date: Wed, 17 Dec 2014 02:49:54 +0000 (-0700) Subject: gettime-thread: fix missing startup mutex X-Git-Tag: fio-2.2.0~7 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=80fa052058c857f9faafee71f482a155f8a80ba1;p=fio.git gettime-thread: fix missing startup mutex It'll segfault if gtod_cpu= is used, ensure we pass in the mutex. Signed-off-by: Jens Axboe --- diff --git a/gettime-thread.c b/gettime-thread.c index 72cc4d8a..95f35c32 100644 --- a/gettime-thread.c +++ b/gettime-thread.c @@ -63,7 +63,7 @@ int fio_start_gtod_thread(void) pthread_attr_init(&attr); pthread_attr_setstacksize(&attr, PTHREAD_STACK_MIN); - ret = pthread_create(>od_thread, &attr, gtod_thread_main, NULL); + ret = pthread_create(>od_thread, &attr, gtod_thread_main, mutex); pthread_attr_destroy(&attr); if (ret) { log_err("Can't create gtod thread: %s\n", strerror(ret));