]> Cypherpunks repositories - gostls13.git/commit
runtime: make cas64 like cas32 and casp
authorRuss Cox <rsc@golang.org>
Fri, 12 Jul 2013 04:03:32 +0000 (00:03 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 12 Jul 2013 04:03:32 +0000 (00:03 -0400)
commitfb63e4fefbb1325a21f643febc97987c82fcae7a
treef466ebd0309d253308fd2b55a0c3a14b41808f24
parent3a8845b5259e9b4fa80a43444643ea74f1078286
runtime: make cas64 like cas32 and casp

The current cas64 definition hard-codes the x86 behavior
of updating *old with the new value when the cas fails.
This is inconsistent with cas32 and casp.
Make it consistent.

This means that the cas64 uses will be epsilon less efficient
than they might be, because they have to do an unnecessary
memory load on x86. But so be it. Code clarity and consistency
is more important.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/10909045
src/pkg/runtime/asm_amd64.s
src/pkg/runtime/atomic_386.c
src/pkg/runtime/atomic_arm.c
src/pkg/runtime/lfstack.c
src/pkg/runtime/parfor.c
src/pkg/runtime/runtime.c
src/pkg/runtime/runtime.h