diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2023-03-09 22:36:10 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2023-03-09 22:36:10 +0300 |
commit | 1908d8242271880100f24bb685919b3e6a0c1b2f (patch) | |
tree | 628510978c4fe05c212285eee3a2f95767cb9aef /pthread_stop_world.c | |
parent | b49d1aefc29bf6623888abe885b9ac9b85a970df (diff) | |
download | bdwgc-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 'pthread_stop_world.c')
-rw-r--r-- | pthread_stop_world.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/pthread_stop_world.c b/pthread_stop_world.c index 77d1a194..3db01761 100644 --- a/pthread_stop_world.c +++ b/pthread_stop_world.c @@ -839,18 +839,10 @@ GC_INNER void GC_push_all_stacks(void) traced_stack_sect = traced_stack_sect -> prev; } } - if (EXPECT((p -> flags & MAIN_THREAD) == 0, TRUE)) { - hi = crtn -> stack_end; -# ifdef IA64 - bs_lo = crtn -> backing_store_end; -# endif - } else { - /* The original stack. */ - hi = GC_stackbottom; -# ifdef IA64 - bs_lo = BACKING_STORE_BASE; -# endif - } + hi = crtn -> stack_end; +# ifdef IA64 + bs_lo = crtn -> backing_store_end; +# endif # ifdef DEBUG_THREADS GC_log_printf("Stack for thread %p is [%p,%p)\n", (void *)p->id, (void *)lo, (void *)hi); |