From: Matt Birkholz Date: Tue, 10 Mar 2015 22:49:32 +0000 (-0700) Subject: smp: Squash into b9a4a7b. Disk-save only if sole running thread. X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=9900689cc1169b463863aa797af1c1d532956dff;p=mit-scheme.git smp: Squash into b9a4a7b. Disk-save only if sole running thread. --- diff --git a/src/runtime/runtime.pkg b/src/runtime/runtime.pkg index b752be9ae..f014bc266 100644 --- a/src/runtime/runtime.pkg +++ b/src/runtime/runtime.pkg @@ -3604,6 +3604,8 @@ USA. (define-package (runtime save/restore) (files "savres") (parent (runtime)) + (import (runtime thread) + enable-smp?) (export () disk-restore disk-save diff --git a/src/runtime/savres.scm b/src/runtime/savres.scm index eecfd60d5..9089ae254 100644 --- a/src/runtime/savres.scm +++ b/src/runtime/savres.scm @@ -50,13 +50,14 @@ USA. (let ((filename (->namestring (merge-pathnames filename))) (id (if (default-object? id) world-id id)) (time (local-decoded-time))) + (if (and enable-smp? (other-running-threads?)) + (error "Cannot disk-save with other running threads.")) (gc-clean) ((without-interrupts (lambda () (call-with-current-continuation (lambda (continuation) - (if (implemented-primitive-procedure? - (ucode-primitive smp-count 0)) + (if enable-smp? (smp-drop-band continuation filename id time) (drop-band continuation filename id time)) (read-microcode-tables!)