From: Matt Birkholz <puck@birchwood-abbey.net>
Date: Tue, 10 Mar 2015 23:23:21 +0000 (-0700)
Subject: smp: without-interrupts: string.scm
X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=3f5c7a1e4a24b84e0bbcbc8647988d68e79aca55;p=mit-scheme.git

smp: without-interrupts: string.scm
---

diff --git a/README.txt b/README.txt
index f753dac6d..c47a78389 100644
--- a/README.txt
+++ b/README.txt
@@ -1559,8 +1559,21 @@ The hits with accompanying analysis:
 	files-to-delete element of the fixed-objects vector.
 
   string.scm:178:	   (let ((mask (set-interrupt-enables! interrupt-mask/none)))
+	Caller: %string-head!
   string.scm:199:	     (set-interrupt-enables! mask)
+	Caller: %string-head!
   string.scm:1612:  (without-interrupts
+	Caller: allocate-external-string
+
+	OK.  %string-head! is editing the heap, and must only avoid
+	the GC.  It edits the heap by hacking the string contents
+	before changing the string length (atomically).  Other
+	processors can scan the heap anytime and never see unformatted
+	bytes.
+
+	Allocate-external-string already uses a serialized gc-
+	finalizer.  This seems to be about dropping a new external
+	string.  Changed without-interrupts to without-interruption.
 
   thread.scm:42:;;; they are done, and they must do this without-interrupts.  While
   thread.scm:76:(define-integrable (without-interrupts thunk)
diff --git a/src/runtime/string.scm b/src/runtime/string.scm
index 45afef4f9..721e31d73 100644
--- a/src/runtime/string.scm
+++ b/src/runtime/string.scm
@@ -1609,7 +1609,7 @@ USA.
   (length #f read-only #t))
 
 (define (allocate-external-string n-bytes)
-  (without-interrupts
+  (without-interruption
    (lambda ()
      (add-to-gc-finalizer!
       external-strings