mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-16 16:50:21 +02:00
truly thread-local vms; don't compile popen.scm
* ice-9/Makefile.am: Don't compile popen.scm, its behaviour at runtime is not consistent -- seems to miss some GC references? I suspect a bug in the compiler. In any case without popen.scm being compiled, continuations.test, r4rs.tes, and r5rs_pitfall.test do pass. * libguile/threads.h (scm_i_thread): * libguile/threads.c (thread_mark, guilify_self_2): Add a field for the thread's vm. Previously I had this as a fluid, but it seems that newly created threads share their fluid values from the creator thread; as expected, I guess. In any case one VM should not be active in two threads. * libguile/vm.c (scm_the_vm): Change to access the thread-local vm, instead of accessing a fluid. (scm_the_vm_fluid): Removed. * module/system/vm/vm.scm: Removed *the-vm*.
This commit is contained in:
parent
66db076ae1
commit
2bbe1533e8
5 changed files with 16 additions and 15 deletions
|
@ -158,6 +158,7 @@ thread_mark (SCM obj)
|
|||
scm_gc_mark (t->dynwinds);
|
||||
scm_gc_mark (t->active_asyncs);
|
||||
scm_gc_mark (t->continuation_root);
|
||||
scm_gc_mark (t->vm);
|
||||
return t->dynamic_state;
|
||||
}
|
||||
|
||||
|
@ -506,6 +507,7 @@ guilify_self_2 (SCM parent)
|
|||
scm_gc_register_collectable_memory (t, sizeof (scm_i_thread), "thread");
|
||||
t->continuation_root = scm_cons (t->handle, SCM_EOL);
|
||||
t->continuation_base = t->base;
|
||||
t->vm = SCM_BOOL_F;
|
||||
|
||||
if (scm_is_true (parent))
|
||||
t->dynamic_state = scm_make_dynamic_state (parent);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue