diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2023-05-09 09:22:06 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2023-05-09 09:22:06 +0300 |
commit | 2807afdfea2d28ec514223cea7ba2f59f340faf9 (patch) | |
tree | 523a5318594c1bbc18f1500785946064827f6f15 | |
parent | 2e2fb427e005dc0f8ea1df08458e250b740200da (diff) | |
download | bdwgc-2807afdfea2d28ec514223cea7ba2f59f340faf9.tar.gz |
Allow single signal usage for both world suspend and resume in gctest
By default, 2 distinct signals are used for suspend and resume of the
world except for platforms where the signal context is not used.
* tests/gctest.c [GC_PTHREADS] (main): Move GC_set_suspend_signal()
call to be before GC_COND_INIT() one.
* tests/gctest.c [GC_PTHREADS && TEST_REUSE_SIG_SUSPEND] (main): Pass
value of GC_get_thr_restart_signal() to GC_set_suspend_signal().
-rw-r--r-- | tests/gctest.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/gctest.c b/tests/gctest.c index ebacf1da..48265b04 100644 --- a/tests/gctest.c +++ b/tests/gctest.c @@ -2587,6 +2587,11 @@ int main(void) GC_printf("Using Darwin task-threads-based world stop and push\n"); # endif GC_set_markers_count(0); +# ifdef TEST_REUSE_SIG_SUSPEND + GC_set_suspend_signal(GC_get_thr_restart_signal()); +# else + GC_set_suspend_signal(GC_get_suspend_signal()); +# endif GC_COND_INIT(); if ((code = pthread_attr_init(&attr)) != 0) { @@ -2690,7 +2695,6 @@ int main(void) GC_set_same_obj_print_proc(GC_get_same_obj_print_proc()); GC_set_start_callback(GC_get_start_callback()); GC_set_stop_func(GC_get_stop_func()); - GC_set_suspend_signal(GC_get_suspend_signal()); GC_set_thr_restart_signal(GC_get_thr_restart_signal()); GC_set_time_limit(GC_get_time_limit()); # if !defined(PCR) && !defined(SMALL_CONFIG) |