From: Matt Birkholz Date: Sat, 11 Jul 2015 22:34:02 +0000 (-0700) Subject: Call smp-gc-finished at end of the primitive GC daemon. X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=98585e822ff26c59ffeac40791883cde45e9a27f;p=mit-scheme.git Call smp-gc-finished at end of the primitive GC daemon. --- diff --git a/src/runtime/gcdemn.scm b/src/runtime/gcdemn.scm index 2739c263f..15670efb9 100644 --- a/src/runtime/gcdemn.scm +++ b/src/runtime/gcdemn.scm @@ -31,7 +31,7 @@ USA. (define (initialize-package!) (set! primitive-gc-daemons (make-serial-queue)) - (set! trigger-primitive-gc-daemons! (make-trigger primitive-gc-daemons)) + (set! %trigger-primitive-gc-daemons! (make-trigger primitive-gc-daemons)) (set! add-primitive-gc-daemon! (make-adder primitive-gc-daemons)) (set! add-primitive-gc-daemon!/unsafe (make-adder/unsafe primitive-gc-daemons)) @@ -52,10 +52,15 @@ USA. ;;; allocate any storage and they must be prepared to run at times ;;; when many data structures are not consistent. (define primitive-gc-daemons) -(define trigger-primitive-gc-daemons!) +(define %trigger-primitive-gc-daemons!) (define add-primitive-gc-daemon!) (define add-primitive-gc-daemon!/unsafe) +(define (trigger-primitive-gc-daemons!) + (%trigger-primitive-gc-daemons!) + (if enable-smp? + ((ucode-primitive smp-gc-finished 0)))) + ;;; GC-DAEMONS are executed after each GC from an interrupt handler. ;;; This interrupt handler has lower priority than the GC interrupt, ;;; which guarantees that these daemons will not be run inside of diff --git a/src/runtime/runtime.pkg b/src/runtime/runtime.pkg index f54e097e9..653eae3e9 100644 --- a/src/runtime/runtime.pkg +++ b/src/runtime/runtime.pkg @@ -1988,6 +1988,8 @@ USA. trigger-secondary-gc-daemons!) (export (runtime interrupt-handler) trigger-gc-daemons!) + (import (runtime thread) + enable-smp?) (initialization (initialize-package!))) (define-package (runtime gc-finalizer)