diff options
author | Andy Wingo <wingo@pobox.com> | 2018-06-24 09:32:11 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2018-06-25 17:49:50 +0200 |
commit | 7f7169847ee047d585b7c9ca6c56e991aaf74edc (patch) | |
tree | 3fddcad520b143bcb1da2a04ee8c85d2fffcfdcc /libguile/vm.h | |
parent | 2480761bde7d55ef05cc11eb49902ede84c70a0a (diff) | |
download | guile-7f7169847ee047d585b7c9ca6c56e991aaf74edc.tar.gz |
Eagerly initialize thread VM; remove scm_the_vm
* libguile/threads.c (thread_mark): Unconditionally call
scm_i_vm_mark_stack.
(guilify_self_1): Eagerly prepare the thread stack, before entering
Guile mode. It's only a page of mmap, after all.
* libguile/vm.c (scm_i_vm_prepare_stack): Rename from init_vm.
(thread_vm, scm_the_vm): Remove.
(VM_DEFINE_HOOK, scm_vm_trace_level, scm_set_vm_trace_level_x)
(scm_vm_engine, scm_c_set_vm_engine_x, scm_i_capture_current_stack)
(scm_call_n, scm_call_with_stack_overflow_handler): Adapt to get VM
from thread.
(scm_i_vm_free_stack): Memset the whole thing to 0 when we're done.
* libguile/control.c (scm_abort_to_prompt_star)
* libguile/eval.c (eval):
* libguile/throw.c (catch, abort_to_prompt): Get VM from thread.
Diffstat (limited to 'libguile/vm.h')
-rw-r--r-- | libguile/vm.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libguile/vm.h b/libguile/vm.h index 0d8cb8688..a018e39d6 100644 --- a/libguile/vm.h +++ b/libguile/vm.h @@ -61,7 +61,6 @@ struct scm_vm { int engine; /* which vm engine we're using */ }; -SCM_INTERNAL struct scm_vm *scm_the_vm (void); SCM_API SCM scm_call_with_vm (SCM proc, SCM args); SCM_API SCM scm_call_with_stack_overflow_handler (SCM limit, SCM thunk, @@ -80,6 +79,7 @@ SCM_API SCM scm_set_default_vm_engine_x (SCM engine); SCM_API void scm_c_set_vm_engine_x (int engine); SCM_API void scm_c_set_default_vm_engine_x (int engine); +SCM_INTERNAL void scm_i_vm_prepare_stack (struct scm_vm *vp); struct GC_ms_entry; SCM_INTERNAL struct GC_ms_entry * scm_i_vm_mark_stack (struct scm_vm *, struct GC_ms_entry *, |