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

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

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

revision 1.33 by mvo, Sun Nov 25 15:21:07 2001 UTC revision 1.34 by mvo, Mon Feb 11 18:06:49 2002 UTC
# Line 324  c_launch_thread (void *p) Line 324  c_launch_thread (void *p)
324                       data,                       data,
325                       (SCM_STACKITEM *) &thread);                       (SCM_STACKITEM *) &thread);
326    scm_thread_count--;    scm_thread_count--;
327    scm_must_free ((char *) data);    free ((char *) data);
328  }  }
329    
330  SCM  SCM
# Line 334  scm_spawn_thread (scm_t_catch_body body, Line 334  scm_spawn_thread (scm_t_catch_body body,
334    SCM thread;    SCM thread;
335    coop_t *t;    coop_t *t;
336    SCM root, old_winds;    SCM root, old_winds;
337    c_launch_data *data = (c_launch_data *) scm_must_malloc (sizeof (*data),    c_launch_data *data = (c_launch_data *) scm_malloc (sizeof (*data));
                                                            "scm_spawn_thread");  
338        
339    /* Unwind wind chain. */    /* Unwind wind chain. */
340    old_winds = scm_dynwinds;    old_winds = scm_dynwinds;
# Line 414  scm_single_thread_p (void) Line 413  scm_single_thread_p (void)
413  SCM  SCM
414  scm_make_mutex (void)  scm_make_mutex (void)
415  {  {
416    SCM m;    SCM m = scm_make_smob (scm_tc16_mutex);
417    coop_m *data = (coop_m *) scm_must_malloc (sizeof (coop_m), "mutex");    coop_mutex_init (SCM_MUTEX_DATA (m));
   
   SCM_NEWSMOB (m, scm_tc16_mutex, (scm_t_bits) data);  
   coop_mutex_init (data);  
418    return m;    return m;
419  }  }
420    
# Line 446  scm_unlock_mutex (SCM m) Line 442  scm_unlock_mutex (SCM m)
442  SCM  SCM
443  scm_make_condition_variable (void)  scm_make_condition_variable (void)
444  {  {
445    SCM c;    SCM c = scm_make_smob (scm_tc16_condvar);
   coop_c *data = (coop_c *) scm_must_malloc (sizeof (coop_c), "condvar");  
   SCM_NEWSMOB (c, scm_tc16_condvar, (scm_t_bits) data);  
446    coop_condition_variable_init (SCM_CONDVAR_DATA (c));    coop_condition_variable_init (SCM_CONDVAR_DATA (c));
447    return c;    return c;
448  }  }

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34

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