X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcode%2Fsignal.lisp;h=41be48f55c57f6f100fe5da1cbfe4fa041b49bb2;hb=7e24349c17298e2959e853ea411b5f65d9f7f332;hp=9d2290a05a650f2d537d001bf8f85f100650bba1;hpb=dcf8b8ccc1e15a5c1c6aba00204b7d3a81827acc;p=sbcl.git diff --git a/src/code/signal.lisp b/src/code/signal.lisp index 9d2290a..41be48f 100644 --- a/src/code/signal.lisp +++ b/src/code/signal.lisp @@ -49,23 +49,23 @@ userspace threads, in SBCL WITHOUT-INTERRUPTS does not inhibit scheduling of other threads." (let ((name (gensym "WITHOUT-INTERRUPTS-BODY-"))) `(flet ((,name () ,@body)) - (if *interrupts-enabled* - (unwind-protect - (let ((*interrupts-enabled* nil)) - (,name)) - ;; If we were interrupted in the protected section, then - ;; the interrupts are still blocked and it remains so - ;; until the pending interrupt is handled. - ;; - ;; If we were not interrupted in the protected section, - ;; but here, then even if the interrupt handler enters - ;; another WITHOUT-INTERRUPTS, the pending interrupt will - ;; be handled immediately upon exit from said - ;; WITHOUT-INTERRUPTS, so it is as if nothing has - ;; happened. - (when *interrupt-pending* - (receive-pending-interrupt))) - (,name))))) + (if *interrupts-enabled* + (unwind-protect + (let ((*interrupts-enabled* nil)) + (,name)) + ;; If we were interrupted in the protected section, then + ;; the interrupts are still blocked and it remains so + ;; until the pending interrupt is handled. + ;; + ;; If we were not interrupted in the protected section, + ;; but here, then even if the interrupt handler enters + ;; another WITHOUT-INTERRUPTS, the pending interrupt will + ;; be handled immediately upon exit from said + ;; WITHOUT-INTERRUPTS, so it is as if nothing has + ;; happened. + (when *interrupt-pending* + (receive-pending-interrupt))) + (,name))))) (sb!xc:defmacro with-interrupts (&body body) #!+sb-doc