Don't want to add a configure test for it now...
Török Edvin authored on 2010/11/23 20:31:47... | ... |
@@ -522,7 +522,11 @@ START_TEST (test_load_bytecode_int) |
522 | 522 |
} |
523 | 523 |
END_TEST |
524 | 524 |
|
525 |
-#if defined(CL_THREAD_SAFE) && defined(C_LINUX) |
|
525 |
+#if defined(CL_THREAD_SAFE) && defined(C_LINUX) && ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= (2 << 16) + 2) |
|
526 |
+#define DO_BARRIER |
|
527 |
+#endif |
|
528 |
+ |
|
529 |
+#ifdef DO_BARRIER |
|
526 | 530 |
static pthread_barrier_t barrier; |
527 | 531 |
static void* thread(void *arg) |
528 | 532 |
{ |
... | ... |
@@ -615,7 +619,7 @@ Suite *test_bytecode_suite(void) |
615 | 615 |
|
616 | 616 |
tcase_add_test(tc_cli_arith, test_load_bytecode_jit); |
617 | 617 |
tcase_add_test(tc_cli_arith, test_load_bytecode_int); |
618 |
-#if defined(CL_THREAD_SAFE) && defined(C_LINUX) |
|
618 |
+#ifdef DO_BARRIER |
|
619 | 619 |
tcase_add_test(tc_cli_arith, test_parallel_load); |
620 | 620 |
#endif |
621 | 621 |
|