From 8b10107c405cd1236d6ca3eefa94dd31b54526a6 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sun, 23 Feb 2020 10:28:51 +0100 Subject: [PATCH] fix: #520 - calling init before initialize mutexs is bad --- client/cmdhfmfhard.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/cmdhfmfhard.c b/client/cmdhfmfhard.c index d83c60047..f9e68ca67 100644 --- a/client/cmdhfmfhard.c +++ b/client/cmdhfmfhard.c @@ -2019,12 +2019,12 @@ __attribute__((force_align_arg_pointer)) static void generate_candidates(uint8_t sum_a0_idx, uint8_t sum_a8_idx) { - init_statelist_cache(); - init_book_of_work(); - // create mutexes for accessing the statelist cache and our "book of work" pthread_mutex_init(&statelist_cache_mutex, NULL); pthread_mutex_init(&book_of_work_mutex, NULL); + + init_statelist_cache(); + init_book_of_work(); // create and run worker threads pthread_t thread_id[NUM_REDUCTION_WORKING_THREADS];