From 7ff0049bb9e764764e5ba50b02c20d23448051c2 Mon Sep 17 00:00:00 2001 From: jgarcia Date: Sun, 25 Nov 2007 18:45:49 +0000 Subject: [PATCH] Fix si_check_pending_interrupts and export it to the lisp world (Needed by WITHOUT-INTERRUPTS). (Thanks to Dan Corkill) --- src/c/symbols_list.h | 1 + src/c/symbols_list2.h | 1 + src/c/unixint.d | 6 ++++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/c/symbols_list.h b/src/c/symbols_list.h index 770a99ed7..00966f495 100644 --- a/src/c/symbols_list.h +++ b/src/c/symbols_list.h @@ -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}, diff --git a/src/c/symbols_list2.h b/src/c/symbols_list2.h index 9649f1b53..b5e2c4b19 100644 --- a/src/c/symbols_list2.h +++ b/src/c/symbols_list2.h @@ -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}, diff --git a/src/c/unixint.d b/src/c/unixint.d index 8e6a0117a..258e8e529 100644 --- a/src/c/unixint.d +++ b/src/c/unixint.d @@ -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) }