From: Taylor R Campbell Date: Wed, 9 Jan 2019 04:04:51 +0000 (+0000) Subject: Defer unmasking timer interrupt until after daemon is marked running. X-Git-Tag: mit-scheme-pucked-10.1.10~6^2~15 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=8e0f00a824e4d2ba103e5e7464946b63cf05f067;p=mit-scheme.git Defer unmasking timer interrupt until after daemon is marked running. Otherwise we might re-enter on timer interrupt. --- diff --git a/src/runtime/interrupt.scm b/src/runtime/interrupt.scm index 2fcd665a1..b77ea436e 100644 --- a/src/runtime/interrupt.scm +++ b/src/runtime/interrupt.scm @@ -120,16 +120,17 @@ USA. (named-lambda (after-gc-interrupt-handler interrupt-code interrupt-enables) (declare (ignore interrupt-code interrupt-enables)) (clear-interrupts! interrupt-bit/after-gc) - (set-interrupt-enables! interrupt-mask/timer-ok) ;; By checking that this handler is not still running we ignore ;; GCs that occur while we are running the daemons. This helps ;; prevent us from getting into a loop just running the daemons. (if (not running?) (begin (set! running? #t) + (set-interrupt-enables! interrupt-mask/timer-ok) (trigger-gc-daemons!) (set! running? #f) - (handle-current-thread-events)))))) + (handle-current-thread-events)) + (set-interrupt-enables! interrupt-mask/timer-ok))))) (define event:console-resize) (define (console-resize-handler interrupt-code interrupt-enables)