X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fassembly%2Fx86%2Falloc.lisp;h=65cfdb066d6e0610c785d80bed9744e0123d8991;hb=95591ed483dbb8c0846c129953acac1554f28809;hp=030d00293fc58bc34891b83e6168d06a92390896;hpb=0bb093a109ec94a021e413bd0ae6ae7fdf54d774;p=sbcl.git diff --git a/src/assembly/x86/alloc.lisp b/src/assembly/x86/alloc.lisp index 030d002..65cfdb0 100644 --- a/src/assembly/x86/alloc.lisp +++ b/src/assembly/x86/alloc.lisp @@ -102,8 +102,7 @@ (emit-label get-tls-index-lock) (inst mov target 1) (inst xor eax-tn eax-tn) - (inst lock) - (inst cmpxchg (make-ea-for-symbol-value *tls-index-lock*) target) + (inst cmpxchg (make-ea-for-symbol-value *tls-index-lock*) target :lock) (inst jmp :ne get-tls-index-lock) ;; The symbol is now in OTHER. (inst pop other) @@ -121,6 +120,7 @@ (fixnumize 1)) (storew target other symbol-tls-index-slot other-pointer-lowtag) (emit-label release-tls-index-lock) + ;; No need for barriers on x86/x86-64 on unlock. (store-symbol-value 0 *tls-index-lock*) ;; Restore OTHER. (inst pop other))