X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fassembly%2Fx86-64%2Falloc.lisp;h=2c113b0332734232e87cd5a75a21bdf38007e95b;hb=c0578d9893429c9c0da80ea5920360e4621fddab;hp=68a8ce33c31441fcbfe17c44a37f1937e81f76bb;hpb=c6538bf61955a67d0145aa3e6c937f6dd03f9e51;p=sbcl.git diff --git a/src/assembly/x86-64/alloc.lisp b/src/assembly/x86-64/alloc.lisp index 68a8ce3..2c113b0 100644 --- a/src/assembly/x86-64/alloc.lisp +++ b/src/assembly/x86-64/alloc.lisp @@ -94,8 +94,7 @@ (emit-label get-tls-index-lock) (inst mov target 1) (zeroize rax-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) @@ -113,6 +112,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))