aboutsummaryrefslogtreecommitdiff
path: root/src/sync
diff options
context:
space:
mode:
authorMartin Möhrmann <moehrmann@google.com>2020-11-21 15:53:18 +0100
committerMartin Möhrmann <moehrmann@google.com>2020-11-23 05:57:35 +0000
commitd902791b509b641683d4ec58b282180c56918aec (patch)
treead831d6b4c6e642d7f256ca721c4ee05666b1875 /src/sync
parent9ea6364a5e9f776af36604c2c20501e6d07f8467 (diff)
downloadgo-d902791b509b641683d4ec58b282180c56918aec.tar.gz
go-d902791b509b641683d4ec58b282180c56918aec.zip
sync: use 386 instead of x86-32 to refer to the 32 bit x86 architecture
This aligns the naming with GOARCH using 386 as a build target for this architecture and makes it more easily found when searching for documentation related to the build target. Change-Id: I393bb89dd2f71e568124107b13e1b288fbd0c76a Reviewed-on: https://go-review.googlesource.com/c/go/+/271988 Trust: Martin Möhrmann <moehrmann@google.com> Run-TryBot: Martin Möhrmann <martisch@uos.de> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/sync')
-rw-r--r--src/sync/atomic/doc.go11
-rw-r--r--src/sync/once.go2
2 files changed, 6 insertions, 7 deletions
diff --git a/src/sync/atomic/doc.go b/src/sync/atomic/doc.go
index ff4ad80049..805ef956d5 100644
--- a/src/sync/atomic/doc.go
+++ b/src/sync/atomic/doc.go
@@ -43,15 +43,14 @@ import (
"unsafe"
)
-// BUG(rsc): On x86-32, the 64-bit functions use instructions unavailable before the Pentium MMX.
+// BUG(rsc): On 386, the 64-bit functions use instructions unavailable before the Pentium MMX.
//
// On non-Linux ARM, the 64-bit functions use instructions unavailable before the ARMv6k core.
//
-// On ARM, x86-32, and 32-bit MIPS,
-// it is the caller's responsibility to arrange for 64-bit
-// alignment of 64-bit words accessed atomically. The first word in a
-// variable or in an allocated struct, array, or slice can be relied upon to be
-// 64-bit aligned.
+// 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.
+// The first word in a variable or in an allocated struct, array, or slice can
+// be relied upon to be 64-bit aligned.
// SwapInt32 atomically stores new into *addr and returns the previous *addr value.
func SwapInt32(addr *int32, new int32) (old int32)
diff --git a/src/sync/once.go b/src/sync/once.go
index bf4b80c867..8844314e7e 100644
--- a/src/sync/once.go
+++ b/src/sync/once.go
@@ -15,7 +15,7 @@ type Once struct {
// done indicates whether the action has been performed.
// It is first in the struct because it is used in the hot path.
// The hot path is inlined at every call site.
- // Placing done first allows more compact instructions on some architectures (amd64/x86),
+ // Placing done first allows more compact instructions on some architectures (amd64/386),
// and fewer instructions (to calculate offset) on other architectures.
done uint32
m Mutex