summaryrefslogtreecommitdiff
path: root/mach_dep.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 /mach_dep.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 'mach_dep.c')
-rw-r--r--mach_dep.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mach_dep.c b/mach_dep.c
index 6a4db79a..c90f8e02 100644
--- a/mach_dep.c
+++ b/mach_dep.c
@@ -66,6 +66,10 @@
>> (63-E2K_PSHTP_SIZE)); \
} while (0)
+ GC_INNER void GC_free_procedure_stack(ptr_t buf) {
+ free(buf);
+ }
+
GC_INNER size_t GC_get_procedure_stack(ptr_t *buf_ptr) {
word ps;
ptr_t buf = NULL;