1.0.4.60: More efficient structure raw slot accessors on x86-64
[sbcl.git] / src / code / target-thread.lisp
index c719833..be8eeb4 100644 (file)
@@ -197,7 +197,8 @@ in future versions."
   ;; %instance-set-conditional can test for 0 (which is a fixnum) and
   ;; store any value
   #!+sb-thread
-  (compare-and-exchange-spinlock-value spinlock 0 1)
+  (loop until
+       (eql 0 (compare-and-exchange-spinlock-value spinlock 0 1)))
   t)
 
 (defun release-spinlock (spinlock)
@@ -498,7 +499,7 @@ this semaphore, then N of them is woken up."
     (when *session*
       (%delete-thread-from-session thread *session*)))
   #!+sb-lutex
-  (when (thread-interruptions-lock thread)
+  (without-gcing
     (/show0 "FREEING MUTEX LUTEX")
     (with-lutex-address (lutex (mutex-lutex (thread-interruptions-lock thread)))
       (%lutex-destroy lutex))))