1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 04:10:18 +02:00

* threads.c (create_thread): Don't unwind dynwind chain of parent

thread before creation.  Just start the new thread with an empty
dynwind chain.
This commit is contained in:
Mikael Djurfeldt 2003-01-22 10:29:28 +00:00
parent 51407fa0b7
commit b4debead6a
2 changed files with 9 additions and 8 deletions

View file

@ -1,3 +1,9 @@
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.

View file

@ -373,15 +373,11 @@ create_thread (scm_t_catch_body body, void *body_data,
{
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));
@ -399,6 +395,8 @@ create_thread (scm_t_catch_body body, void *body_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
@ -427,9 +425,6 @@ create_thread (scm_t_catch_body body, void *body_data,
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;