When run in server mode, jobs are processed before fio_time_init()
is called, which causes pthread_setspecific() to be called before
pthread_key_create(). Work around this by calling it in thread_main()
too.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
} else
td->pid = gettid();
+ /*
+ * fio_time_init() may not have been called yet if running as a server
+ */
+ fio_time_init();
+
fio_local_clock_init(o->use_thread);
dprint(FD_PROCESS, "jobs pid=%d started\n", (int) td->pid);
if (fio_gtod_offload && fio_start_gtod_thread())
return;
-
+
fio_idle_prof_init();
set_sig_handlers();