Skip to content

Commit 6cefff6

Browse files
authored
Merge pull request #91 from janciesko/qt_initialized_compat_atomics
Add missing header
2 parents d1d8101 + 2ca6dbf commit 6cefff6

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/compat_atomics.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "qt_asserts.h"
88
#include "qthread_innards.h"
99
#include "qt_profiling.h"
10+
#include "qt_initialized.h"
1011

1112
extern unsigned int QTHREAD_LOCKING_STRIPES;
1213
#define QTHREAD_CHOOSE_STRIPE(addr) (((size_t)addr >> 4) & (QTHREAD_LOCKING_STRIPES - 1))

src/qthread.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,11 @@ int API_FUNC qthread_initialize(void)
829829
qt_internal_alignment_init();
830830
qt_hash_initialize_subsystem();
831831

832+
#ifndef QTHREAD_NO_ASSERTS
833+
qthread_library_initialized = 1;
834+
MACHINE_FENCE;
835+
#endif
836+
832837
qt_topology_init(&nshepherds,
833838
&nworkerspershep,
834839
&hw_par);
@@ -936,10 +941,7 @@ int API_FUNC qthread_initialize(void)
936941
}
937942
qaffinity = qt_internal_get_env_bool("AFFINITY", 1);
938943
qthread_debug(AFFINITY_DETAILS, "qaffinity = %i\n", qaffinity);
939-
#ifndef QTHREAD_NO_ASSERTS
940-
qthread_library_initialized = 1;
941-
MACHINE_FENCE;
942-
#endif
944+
943945
{
944946
int ret = qt_affinity_gendists(qlib->shepherds, nshepherds);
945947
if (ret != QTHREAD_SUCCESS) {

0 commit comments

Comments
 (0)