]> Cypherpunks.ru repositories - gostls13.git/commitdiff
sync/atomic: note that alignment responsibility doesn't apply to types
authorMichael Pratt <mpratt@google.com>
Fri, 3 Jun 2022 17:47:10 +0000 (13:47 -0400)
committerMichael Pratt <mpratt@google.com>
Fri, 3 Jun 2022 19:58:02 +0000 (19:58 +0000)
For #50860.

Change-Id: I8e117f00c5da230d0dc398aaed417fe5e64a5b22
Reviewed-on: https://go-review.googlesource.com/c/go/+/410127
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Michael Pratt <mpratt@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/sync/atomic/doc.go

index a7d5b46288ac36fbbdce8cbe210101150f7fee4a..bb3b8f673ec781050b86b04bc6ced434a108e9bb 100644 (file)
@@ -46,8 +46,9 @@ import (
 //
 // On non-Linux ARM, the 64-bit functions use instructions unavailable before the ARMv6k core.
 //
-// On ARM, 386, and 32-bit MIPS, it is the caller's responsibility
-// to arrange for 64-bit alignment of 64-bit words accessed atomically.
+// On ARM, 386, and 32-bit MIPS, it is the caller's responsibility to arrange
+// for 64-bit alignment of 64-bit words accessed atomically via the primitive
+// atomic functions (types Int64 and Uint64 are automatically aligned).
 // The first word in a variable or in an allocated struct, array, or slice can
 // be relied upon to be 64-bit aligned.