Disable the "already locked!" assert when multi-processing. SMP
authorMatt Birkholz <puck@birchwood-abbey.net>
Wed, 22 Jul 2015 15:38:55 +0000 (08:38 -0700)
committerMatt Birkholz <puck@birchwood-abbey.net>
Thu, 26 Nov 2015 08:09:47 +0000 (01:09 -0700)
src/runtime/thread.scm

index 363d7f691070dd9eaee6278934d2baba901f7e32..fc0be3853b04e5607d3d406f33963f5b4a251b64 100644 (file)
@@ -41,7 +41,10 @@ USA.
   (eq? interrupt-mask/gc-ok (get-interrupt-enables)))
 
 (define-integrable (lock)
-  (%assert (not locked?) "lock: already locked!")
+  (%assert (not (and (eq? 1 processor-count)
+                    ;; This happens when there is contention.  It
+                    ;; indicates a problem only when uni-processing.
+                    locked?)) "lock: already locked!")
   (set-interrupt-enables! interrupt-mask/gc-ok)
   (%lock))