Fix si_check_pending_interrupts and export it to the lisp world (Needed by WITHOUT-INTERRUPTS). (Thanks to Dan Corkill)

This commit is contained in:
jgarcia 2007-11-25 18:45:49 +00:00
parent 9853379317
commit 7ff0049bb9
3 changed files with 6 additions and 2 deletions

View file

@ -1516,6 +1516,7 @@ cl_symbols[] = {
{MP_ "+LOAD-COMPILE-LOCK+", MP_CONSTANT, NULL, -1, OBJNULL},
{MP_ "WITH-LOCK", MP_CONSTANT, NULL, -1, OBJNULL},
{MP_ "WITHOUT-INTERRUPTS", MP_CONSTANT, NULL, -1, OBJNULL},
{MP_ "CHECK-PENDING-INTERRUPTS", SI_ORDINARY, si_check_pending_interrupts, 0, OBJNULL},
#endif
{SYS_ "WHILE", SI_ORDINARY, NULL, -1, OBJNULL},

View file

@ -1516,6 +1516,7 @@ cl_symbols[] = {
{MP_ "+LOAD-COMPILE-LOCK+",NULL},
{MP_ "WITH-LOCK",NULL},
{MP_ "WITHOUT-INTERRUPTS",NULL},
{MP_ "CHECK-PENDING-INTERRUPTS","si_check_pending_interrupts"},
#endif
{SYS_ "WHILE",NULL},

View file

@ -172,11 +172,13 @@ si_check_pending_interrupts(void)
{
int what = cl_env.interrupt_pending;
cl_env.interrupt_pending = 0;
if (what) {
#if defined (HAVE_SIGPROCMASK) && defined(SA_SIGINFO)
handle_signal(what, 0, 0);
handle_signal(what, 0, 0);
#else
handle_signal(what);
handle_signal(what);
#endif
}
@(return)
}