X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fsignal.lisp;h=248a1027895a4976c1f252c6efec312e49a52c97;hb=f61bddabbb69f1347b81b8ab76e709635a7a0739;hp=7b1b6799be6d822995b919605250cf0271291eff;hpb=68a83a65688bb578163c502e045da298d20a1f0c;p=sbcl.git diff --git a/src/code/signal.lisp b/src/code/signal.lisp index 7b1b679..248a102 100644 --- a/src/code/signal.lisp +++ b/src/code/signal.lisp @@ -30,15 +30,13 @@ ;;; saved value. When that hander returns, the original signal mask is ;;; installed, allowing any other pending signals to be handled. ;;; -;;; This means that the cost of without-interrupts is just a special +;;; This means that the cost of WITHOUT-INTERRUPTS is just a special ;;; binding in the case when no signals are delivered (the normal ;;; case). It's only when a signal is actually delivered that we use ;;; any system calls, and by then the cost of the extra system calls ;;; are lost in the noise when compared with the cost of delivering ;;; the signal in the first place. -#!-gengc (progn - (defvar *interrupts-enabled* t) (defvar *interrupt-pending* nil) @@ -72,30 +70,6 @@ (when *interrupt-pending* (do-pending-interrupt)) (,name)))))) - -) ; PROGN - -;;; On the GENGC system, we have to do it slightly differently because of the -;;; existence of threads. Each thread has a suspends_disabled_count in its -;;; mutator structure. When this value is other then zero, the low level stuff -;;; will not suspend the thread, but will instead set the suspend_pending flag -;;; (also in the mutator). So when we finish the without-interrupts, we just -;;; check the suspend_pending flag and trigger a do-pending-interrupt if -;;; necessary. - -#!+gengc -(defmacro without-interrupts (&body body) - `(unwind-protect - (progn - (locally - (declare (optimize (speed 3) (safety 0))) - (incf (sb!kernel:mutator-interrupts-disabled-count))) - ,@body) - (locally - (declare (optimize (speed 3) (safety 0))) - (when (and (zerop (decf (sb!kernel:mutator-interrupts-disabled-count))) - (not (zerop (sb!kernel:mutator-interrupt-pending)))) - (do-pending-interrupt))))) ;;;; utilities for dealing with signal names and numbers @@ -233,12 +207,4 @@ #!+svr4 (!def-unix-signal :SIGWAITING 32) ; Process's LWPs are blocked. -(sb!xc:defmacro sigmask (&rest signals) - #!+sb-doc - "Returns a mask given a set of signals." - (apply #'logior - (mapcar (lambda (signal) - (ash 1 (1- (unix-signal-number signal)))) - signals))) - (/show0 "done with signal.lisp")