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 |
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; |
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 |
|
|
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 |
} |
} |