1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-23 20:05:32 +02:00

* iselect.c (coop_next_runnable_thread,

coop_wait_for_runnable_thread): Disable interrupts so that no
async is executed before a potential error_revive.
This commit is contained in:
Mikael Djurfeldt 1997-11-28 00:50:58 +00:00
parent 3666451eb0
commit 81e81a5cb7
2 changed files with 17 additions and 2 deletions

View file

@ -1,3 +1,9 @@
1997-11-28 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
* iselect.c (coop_next_runnable_thread,
coop_wait_for_runnable_thread): Disable interrupts so that no
async is executed before a potential error_revive.
1997-11-27 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
* Makefile.am: Added iselect.c and iselect.h.

View file

@ -430,6 +430,7 @@ find_thread (int n, struct timeval *now)
coop_t *
coop_next_runnable_thread ()
{
coop_t *t;
struct timeval now;
int n;
@ -437,6 +438,7 @@ coop_next_runnable_thread ()
if (QEMPTYP (coop_global_sleepq))
return coop_qget (&coop_global_runq);
++scm_ints_disabled;
if (gnfds > 0)
n = safe_select (gnfds, &greadfds, &gwritefds, &gexceptfds, &timeout0);
else
@ -444,9 +446,13 @@ coop_next_runnable_thread ()
if (QFIRST (coop_global_sleepq)->timeoutp)
{
gettimeofday (&now, NULL);
return find_thread (n, &now);
t = find_thread (n, &now);
}
return find_thread (n, 0);
else
t = find_thread (n, 0);
if (!--scm_ints_disabled)
SCM_ASYNC_TICK;
return t;
}
coop_t *
@ -455,6 +461,7 @@ coop_wait_for_runnable_thread_now (struct timeval *now)
int n;
coop_t *t;
++scm_ints_disabled;
if (gnfds > 0)
n = safe_select (gnfds, &greadfds, &gwritefds, &gexceptfds, &timeout0);
else
@ -482,6 +489,8 @@ coop_wait_for_runnable_thread_now (struct timeval *now)
t = find_thread (n, now);
}
if (!--scm_ints_disabled)
SCM_ASYNC_TICK;
return t;
}