summaryrefslogtreecommitdiff
path: root/darwin_stop_world.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2023-03-09 22:36:10 +0300
committerIvan Maidanski <ivmai@mail.ru>2023-03-09 22:36:10 +0300
commit1908d8242271880100f24bb685919b3e6a0c1b2f (patch)
tree628510978c4fe05c212285eee3a2f95767cb9aef /darwin_stop_world.c
parentb49d1aefc29bf6623888abe885b9ac9b85a970df (diff)
downloadbdwgc-1908d8242271880100f24bb685919b3e6a0c1b2f.tar.gz
Remove MAIN_THREAD flag in GC_thread
(refactoring) * darwin_stop_world.c (GC_stack_range_for): Do not check MAIN_THREAD bit of p->flags. * pthread_stop_world.c (GC_push_all_stacks): Likewise. * pthread_support.c [!GC_WIN32_THREADS] (GC_set_stackbottom, GC_get_my_stackbottom): Likewise. * pthread_support.c [!GC_WIN32_THREADS] (GC_call_with_gc_active): Likewise. * darwin_stop_world.c (GC_stack_range_for): Do not use GC_stackbottom. * pthread_stop_world.c (GC_push_all_stacks): Likewise. * pthread_support.c [!GC_WIN32_THREADS] (GC_get_my_stackbottom): Likewise. * dyn_load.c [(SCO_ELF || DGUX || HURD || NACL || __ELF__ && (LINUX || FREEBSD || NETBSD || OPENBSD)) && USE_PROC_FOR_LIBRARIES] (GC_register_map_entries): Do not check GC_stackbottom if THREADS. * include/gc/gc.h (GC_stackbottom): Refine comment (mention that it could be change only before GC initialization if multi-threaded, mention GC_set_stackbottom). * include/private/gcconfig.h [IA64 && (HPUX || LINUX)] (BACKING_STORE_BASE): Remove. * include/private/pthread_support.h [!GC_WIN32_THREADS] (MAIN_THREAD): Likewise. * mark_rts.c [!THREADS && IA64] (GC_push_current_stack): Use GC_register_stackbottom instead of BACKING_STORE_BASE. * pthread_stop_world.c [IA64] (GC_push_all_stacks): Do not use BACKING_STORE_BASE (GC_register_stackbottom). * pthread_support.c [!GC_WIN32_THREADS] (GC_thr_init): Do not set MAIN_THREAD bit of me->flags. * pthread_support.c (GC_set_stackbottom, GC_get_my_stackbottom): Move crtn local variable to outer scope. * pthread_support.c [!GC_WIN32_THREADS] (GC_set_stackbottom): Do not set GC_stackbottom (and GC_register_stackbottom) if GC is initialized. * pthread_support.c [!GC_WIN32_THREADS && IA64] (GC_get_my_stackbottom): Do not use GC_register_stackbottom. * pthread_support.c (GC_call_with_gc_active): Move stack_end local variable to outer scope. * pthread_support.c [!GC_WIN32_THREADS] (GC_call_with_gc_active): Do not use and set GC_stackbottom.
Diffstat (limited to 'darwin_stop_world.c')
-rw-r--r--darwin_stop_world.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/darwin_stop_world.c b/darwin_stop_world.c
index c64b4bfb..76b1e98b 100644
--- a/darwin_stop_world.c
+++ b/darwin_stop_world.c
@@ -333,8 +333,7 @@ STATIC ptr_t GC_stack_range_for(ptr_t *phi, thread_act_t thread, GC_thread p,
if (NULL == p) ABORT("Bad GC_stack_range_for call");
# endif
crtn = p -> crtn;
- *phi = EXPECT((p -> flags & MAIN_THREAD) == 0, TRUE) ? crtn -> stack_end
- : GC_stackbottom;
+ *phi = crtn -> stack_end;
if (crtn -> altstack != NULL && (word)(crtn -> altstack) <= (word)lo
&& (word)lo <= (word)(crtn -> altstack) + crtn -> altstack_size) {
*paltstack_lo = lo;