mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-11 22:31:12 +02:00
* coop-threads.c (scm_call_with_new_thread, scm_spawn_thread):
Changed SETCDR --> SET_CELL_WORD_1. * coop-threads.c (scheme_launch_thread): Set word 1 of handle to 0 when thread dies.
This commit is contained in:
parent
ad1a269029
commit
0e551780ec
1 changed files with 3 additions and 2 deletions
|
@ -213,6 +213,7 @@ scheme_launch_thread (void *p)
|
|||
(scm_catch_handler_t) scheme_handler_bootstrip,
|
||||
&data,
|
||||
(SCM_STACKITEM *) &thread);
|
||||
SCM_SET_CELL_WORD_1 (thread, 0);
|
||||
scm_thread_count--;
|
||||
SCM_DEFER_INTS;
|
||||
}
|
||||
|
@ -268,7 +269,7 @@ scm_call_with_new_thread (SCM argl)
|
|||
argl variable may not exist in memory when the thread starts. */
|
||||
t = coop_create (scheme_launch_thread, (void *) argl);
|
||||
t->data = SCM_ROOT_STATE (root);
|
||||
SCM_SETCDR (thread, t);
|
||||
SCM_SET_CELL_WORD_1 (thread, t);
|
||||
scm_thread_count++;
|
||||
/* Note that the following statement also could cause coop_yield.*/
|
||||
SCM_ALLOW_INTS;
|
||||
|
@ -359,7 +360,7 @@ scm_spawn_thread (scm_catch_body_t body, void *body_data,
|
|||
t = coop_create (c_launch_thread, (void *) data);
|
||||
|
||||
t->data = SCM_ROOT_STATE (root);
|
||||
SCM_SETCDR (thread, t);
|
||||
SCM_SET_CELL_WORD_1 (thread, t);
|
||||
scm_thread_count++;
|
||||
/* Note that the following statement also could cause coop_yield.*/
|
||||
SCM_ALLOW_INTS;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue