+2003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
+
+ * threads.c (create_thread): Don't unwind dynwind chain of parent
+ thread before creation. Just start the new thread with an empty
+ dynwind chain.
+
2003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
* evalext.c, evalext.h (scm_self_evaluating_p): New function.
{
scm_t_thread th;
- SCM root, old_winds;
+ SCM root;
launch_data *data;
scm_thread *t;
int err;
- /* Unwind wind chain. */
- old_winds = scm_dynwinds;
- scm_dowinds (SCM_EOL, scm_ilength (scm_root->dynwinds));
-
/* Allocate thread locals. */
root = scm_make_root (scm_root->handle);
data = scm_malloc (sizeof (launch_data));
t->root = SCM_ROOT_STATE (root);
/* disconnect from parent, to prevent remembering dead threads */
t->root->parent = SCM_BOOL_F;
+ /* start with an empty dynwind chain */
+ t->root->dynwinds = SCM_EOL;
/* In order to avoid the need of synchronization between parent
and child thread, we need to insert the child into all_threads
scm_i_plugin_mutex_unlock (&thread_admin_mutex);
}
- /* Return to old dynamic context. */
- scm_dowinds (old_winds, - scm_ilength (old_winds));
-
if (err)
{
errno = err;