summaryrefslogtreecommitdiff
path: root/mark_rts.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2022-01-17 23:51:47 +0300
committerIvan Maidanski <ivmai@mail.ru>2022-01-17 23:51:47 +0300
commit8c2f91a8065d9fb7b238d5c3709bc95dcc727566 (patch)
treeada5159396ddae00c8ad448457656f9617c78463 /mark_rts.c
parentf2a2e55e4206529782cdad538adc260439cd9cd2 (diff)
downloadbdwgc-8c2f91a8065d9fb7b238d5c3709bc95dcc727566.tar.gz
Free E2K procedure stack in a single function
(refactoring) Issue #413 (bdwgc). * include/private/gc_priv.h [E2K] (GC_get_procedure_stack): Document that the function mgiht be called from a signal handler. * include/private/gc_priv.h [E2K] (GC_free_procedure_stack): New function prototype. * mach_dep.c [E2K] (GC_free_procedure_stack): Implement (just call free() for now). * mark_rts.c [!THREADS && !IA64 && E2K] (GC_push_current_stack): Call GC_free_procedure_stack() instead of free(). * pthread_stop_world.c [E2K] (GC_suspend_handler_inner): Likewise. * pthread_stop_world.c [E2K] (GC_push_all_stacks): Likewise. * pthread_support.c [E2K] (GC_do_blocking_inner, GC_call_with_gc_active): Likewise. * pthread_stop_world.c [E2K] (GC_push_all_stacks): Move stack_size local variable declaration to the innermost scope of its usage.
Diffstat (limited to 'mark_rts.c')
-rw-r--r--mark_rts.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/mark_rts.c b/mark_rts.c
index 710d4e95..07012a3c 100644
--- a/mark_rts.c
+++ b/mark_rts.c
@@ -806,12 +806,12 @@ STATIC void GC_push_current_stack(ptr_t cold_gc_frame,
GC_push_all_stack_part_eager_sections(GC_approx_sp(), GC_stackbottom,
cold_gc_frame, GC_traced_stack_sect);
# ifdef IA64
- /* We also need to push the register stack backing store. */
- /* This should really be done in the same way as the */
- /* regular stack. For now we fudge it a bit. */
- /* Note that the backing store grows up, so we can't use */
- /* GC_push_all_stack_partially_eager. */
- {
+ /* We also need to push the register stack backing store. */
+ /* This should really be done in the same way as the */
+ /* regular stack. For now we fudge it a bit. */
+ /* Note that the backing store grows up, so we can't use */
+ /* GC_push_all_stack_partially_eager. */
+ {
ptr_t bsp = GC_save_regs_ret_val;
ptr_t cold_gc_bs_pointer = bsp - 2048;
if (GC_all_interior_pointers
@@ -832,7 +832,7 @@ STATIC void GC_push_current_stack(ptr_t cold_gc_frame,
}
/* All values should be sufficiently aligned that we */
/* don't have to worry about the boundary. */
- }
+ }
# elif defined(E2K)
/* We also need to push procedure stack store. */
/* Procedure stack grows up. */
@@ -843,7 +843,7 @@ STATIC void GC_push_current_stack(ptr_t cold_gc_frame,
GC_push_all_register_sections(bs_lo, bs_lo + stack_size,
TRUE /* eager */,
GC_traced_stack_sect);
- free(bs_lo);
+ GC_free_procedure_stack(bs_lo);
}
# endif
# endif /* !THREADS */