Index: /trunk/source/level-0/X86/x86-misc.lisp
===================================================================
--- /trunk/source/level-0/X86/x86-misc.lisp	(revision 8228)
+++ /trunk/source/level-0/X86/x86-misc.lisp	(revision 8229)
@@ -782,4 +782,16 @@
   
 
+(defx86lapfunction %atomic-pop-static-cons ()
+  @again
+  (movq (@ (+ x8664::nil-value (x8664::kernel-global static-conses))) (% rax))
+  (testq ($ x8664::nil-value) (% rax))
+  (jz @lose)
+  (%cdr rax temp0)
+  (lock)
+  (cmpxchgq (% temp0) (@ (+ x8664::nil-value (x8664::kernel-global static-conses))))
+  (jnz @again)
+  @lose
+  (movq (% rax) (% arg_z))
+  (single-value-return))
   
 
Index: /trunk/source/lib/misc.lisp
===================================================================
--- /trunk/source/lib/misc.lisp	(revision 8228)
+++ /trunk/source/lib/misc.lisp	(revision 8229)
@@ -809,10 +809,9 @@
   "Activates collection of garbage conses in the static-conses
    list and allocates initial static conses."
-  (without-interrupts
-   (%lock-gc-lock)
-   ; Another thread might have called initialize already
-   (when (eq (%get-kernel-global 'static-conses) 0)
-     (%set-kernel-global 'static-conses nil))
-   (%unlock-gc-lock))
+  ; There might be a race here when multiple threads call this
+  ; function.  However, the discarded static conses will become
+  ; garbage and be added right back to the list.  No harm here
+  ; except for additional garbage collections.
+  (%set-kernel-global 'static-conses nil)
   (allocate-static-conses))
 
@@ -842,5 +841,6 @@
   (when (eq (%get-kernel-global 'static-conses) 0)
     (initialize-static-cons))
-  (let ((cell (atomic-pop-kernel-global 'static-conses)))
+  (let ((cell #-x8664-target (atomic-pop-kernel-global 'static-conses)
+	      #+x8664-target (%atomic-pop-static-cons)))
     (if cell
       (progn
