diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2022-01-17 23:51:47 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2022-01-17 23:51:47 +0300 |
commit | 8c2f91a8065d9fb7b238d5c3709bc95dcc727566 (patch) | |
tree | ada5159396ddae00c8ad448457656f9617c78463 /mach_dep.c | |
parent | f2a2e55e4206529782cdad538adc260439cd9cd2 (diff) | |
download | bdwgc-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.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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; |