diff options
author | Mikael Djurfeldt <djurfeldt@nada.kth.se> | 2002-12-11 06:54:59 +0000 |
---|---|---|
committer | Mikael Djurfeldt <djurfeldt@nada.kth.se> | 2002-12-11 06:54:59 +0000 |
commit | 392d2833a2dddee61c5e78bc07aca7fc185fe314 (patch) | |
tree | 8f70d6ff5c62b2b8b135edab76229521dc8fb1c7 /libguile/root.c | |
parent | 960c408c04470b0680e250b44e5273987e1aa66d (diff) | |
download | guile-392d2833a2dddee61c5e78bc07aca7fc185fe314.tar.gz |
* gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
* gc.c (scm_gc_sweep): Call it here instead, which is a more
logical place.
* threads.c (create_thread): Remember root object until the handle
of the new thread is on all_threads list.
* root.c (scm_make_root): Moved copying of fluids until after
creation of root handle so that the fluids are GC protected. Also
removed the critical section.
Diffstat (limited to 'libguile/root.c')
-rw-r--r-- | libguile/root.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libguile/root.c b/libguile/root.c index ff8be7094..e15a6ca61 100644 --- a/libguile/root.c +++ b/libguile/root.c @@ -105,7 +105,6 @@ scm_make_root (SCM parent) if (SCM_ROOTP (parent)) { memcpy (root_state, SCM_ROOT_STATE (parent), sizeof (scm_root_state)); - scm_copy_fluids (root_state); root_state->parent = parent; } else @@ -132,10 +131,13 @@ scm_make_root (SCM parent) root_state->block_asyncs = 0; root_state->pending_asyncs = 1; - SCM_REDEFER_INTS; SCM_NEWSMOB (root, scm_tc16_root, root_state); root_state->handle = root; - SCM_REALLOW_INTS; + + if (SCM_ROOTP (parent)) + /* Must be done here so that fluids are GC protected */ + scm_copy_fluids (root_state); + return root; } |