-
-) ; 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)))))