179 |
do |
do |
180 |
{ |
{ |
181 |
SCM c = SCM_CDR (asyncs); |
SCM c = SCM_CDR (asyncs); |
182 |
SCM_SETCDR (asyncs, SCM_EOL); |
SCM_SETCDR (asyncs, SCM_BOOL_F); |
183 |
scm_call_0 (SCM_CAR (asyncs)); |
scm_call_0 (SCM_CAR (asyncs)); |
184 |
asyncs = c; |
asyncs = c; |
185 |
} |
} |
204 |
void |
void |
205 |
scm_i_queue_async_cell (SCM c, scm_root_state *root) |
scm_i_queue_async_cell (SCM c, scm_root_state *root) |
206 |
{ |
{ |
207 |
if (SCM_CDR (c) == SCM_EOL) |
if (SCM_CDR (c) == SCM_BOOL_F) |
208 |
{ |
{ |
209 |
SCM_SETCDR (c, root->active_asyncs); |
SCM p = root->active_asyncs; |
210 |
root->active_asyncs = c; |
SCM_SETCDR (c, SCM_EOL); |
211 |
|
if (p == SCM_EOL) |
212 |
|
root->active_asyncs = c; |
213 |
|
else |
214 |
|
{ |
215 |
|
SCM pp; |
216 |
|
while ((pp = SCM_CDR(p)) != SCM_EOL) |
217 |
|
{ |
218 |
|
if (SCM_CAR (p) == SCM_CAR (c)) |
219 |
|
return; |
220 |
|
p = pp; |
221 |
|
} |
222 |
|
SCM_SETCDR (p, c); |
223 |
|
} |
224 |
} |
} |
225 |
} |
} |
226 |
|
|
231 |
"use the current thread.") |
"use the current thread.") |
232 |
#define FUNC_NAME s_scm_system_async_mark_for_thread |
#define FUNC_NAME s_scm_system_async_mark_for_thread |
233 |
{ |
{ |
234 |
scm_i_queue_async_cell (scm_cons (proc, SCM_EOL), |
scm_i_queue_async_cell (scm_cons (proc, SCM_BOOL_F), |
235 |
(SCM_UNBNDP (thread) |
(SCM_UNBNDP (thread) |
236 |
? scm_root |
? scm_root |
237 |
: scm_i_thread_root (thread))); |
: scm_i_thread_root (thread))); |