diff --git a/src/sysbench.c b/src/sysbench.c index 426bc9d..e111d7e 100644 --- a/src/sysbench.c +++ b/src/sysbench.c @@ -870,6 +870,9 @@ static void *eventgen_thread_proc(void *arg) (void)arg; /* unused */ + /* Initialize thread-local RNG state */ + sb_rand_thread_init(); + SB_LIST_INIT(&event_queue); i = 0; @@ -943,6 +946,9 @@ static void *report_thread_proc(void *arg) (void)arg; /* unused */ + /* Initialize thread-local RNG state */ + sb_rand_thread_init(); + log_text(LOG_DEBUG, "Reporting thread started"); /* Wait for other threads to initialize */ @@ -982,6 +988,9 @@ static void *checkpoints_thread_proc(void *arg) (void)arg; /* unused */ + /* Initialize thread-local RNG state */ + sb_rand_thread_init(); + log_text(LOG_DEBUG, "Checkpoints report thread started"); /* Wait for other threads to initialize */