/[guile]/guile/guile-core/libguile/threads.c
ViewVC logotype

Diff of /guile/guile-core/libguile/threads.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.49 by mdj, Fri Jan 10 22:16:56 2003 UTC revision 1.50 by mdj, Wed Jan 22 10:29:28 2003 UTC
# Line 373  create_thread (scm_t_catch_body body, vo Line 373  create_thread (scm_t_catch_body body, vo
373    
374    {    {
375      scm_t_thread th;      scm_t_thread th;
376      SCM root, old_winds;      SCM root;
377      launch_data *data;      launch_data *data;
378      scm_thread *t;      scm_thread *t;
379      int err;      int err;
380    
     /* Unwind wind chain. */  
     old_winds = scm_dynwinds;  
     scm_dowinds (SCM_EOL, scm_ilength (scm_root->dynwinds));  
   
381      /* Allocate thread locals. */      /* Allocate thread locals. */
382      root = scm_make_root (scm_root->handle);      root = scm_make_root (scm_root->handle);
383      data = scm_malloc (sizeof (launch_data));      data = scm_malloc (sizeof (launch_data));
# Line 399  create_thread (scm_t_catch_body body, vo Line 395  create_thread (scm_t_catch_body body, vo
395      t->root = SCM_ROOT_STATE (root);      t->root = SCM_ROOT_STATE (root);
396      /* disconnect from parent, to prevent remembering dead threads */      /* disconnect from parent, to prevent remembering dead threads */
397      t->root->parent = SCM_BOOL_F;      t->root->parent = SCM_BOOL_F;
398        /* start with an empty dynwind chain */
399        t->root->dynwinds = SCM_EOL;
400            
401      /* In order to avoid the need of synchronization between parent      /* In order to avoid the need of synchronization between parent
402         and child thread, we need to insert the child into all_threads         and child thread, we need to insert the child into all_threads
# Line 427  create_thread (scm_t_catch_body body, vo Line 425  create_thread (scm_t_catch_body body, vo
425          scm_i_plugin_mutex_unlock (&thread_admin_mutex);          scm_i_plugin_mutex_unlock (&thread_admin_mutex);
426        }        }
427    
     /* Return to old dynamic context. */  
     scm_dowinds (old_winds, - scm_ilength (old_winds));  
   
428      if (err)      if (err)
429        {        {
430          errno = err;          errno = err;

Legend:
Removed from v.1.49  
changed lines
  Added in v.1.50

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26