Reviewers: dvyukov, iant,
Message:
Hello dvyukov, iant (cc: golang-dev@googlegroups.com),
I'd like you to review this change to
https://code.google.com/p/go/
Description:
sync/atomic: document that users must deal with 64-bit alignment
Update issue 599.
Please review this at https://codereview.appspot.com/7001056/
Affected files:
M src/pkg/sync/atomic/doc.go
Index: src/pkg/sync/atomic/doc.go
===================================================================
--- a/src/pkg/sync/atomic/doc.go
+++ b/src/pkg/sync/atomic/doc.go
@@ -41,6 +41,10 @@
// BUG(rsc): On ARM, the 64-bit functions use instructions unavailable
before ARM 11.
//
// On x86-32, the 64-bit functions use instructions unavailable before the
Pentium MMX.
+//
+// On both ARM and x86-32, it is the caller's responsibility to arrange
for 64-bit
+// alignment of 64-bit words accessed atomically. The first word in an
allocated
+// struct or slice can be relied upon to be 64-bit aligned.
// CompareAndSwapInt32 executes the compare-and-swap operation for an
int32 value.
func CompareAndSwapInt32(addr *int32, old, new int32) (swapped bool)