Call smp-gc-finished at end of the primitive GC daemon.
authorMatt Birkholz <puck@birchwood-abbey.net>
Sat, 11 Jul 2015 22:34:02 +0000 (15:34 -0700)
committerMatt Birkholz <puck@birchwood-abbey.net>
Sat, 11 Jul 2015 22:34:02 +0000 (15:34 -0700)
src/runtime/gcdemn.scm
src/runtime/runtime.pkg

index 2739c263f292221633724741aee43c361442a620..15670efb94b3f3211fa0f1a053459ec3b828a79c 100644 (file)
@@ -31,7 +31,7 @@ USA.
 \f
 (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
index f54e097e92adbd66101c05b297f4ad36c575905b..653eae3e93bc64e37a1b6b84e59e25e114a9333d 100644 (file)
@@ -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)