sync/atomic: note that alignment responsibility doesn't apply to types

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>
This commit is contained in:
Michael Pratt 2022-06-03 13:47:10 -04:00
parent e1036a741c
commit 0eb7051aad

View 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.