Skip to content

Commit d902791

Browse files
committed
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 <[email protected]> Run-TryBot: Martin Möhrmann <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 9ea6364 commit d902791

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/sync/atomic/doc.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,14 @@ import (
4343
"unsafe"
4444
)
4545

46-
// BUG(rsc): On x86-32, the 64-bit functions use instructions unavailable before the Pentium MMX.
46+
// BUG(rsc): On 386, the 64-bit functions use instructions unavailable before the Pentium MMX.
4747
//
4848
// On non-Linux ARM, the 64-bit functions use instructions unavailable before the ARMv6k core.
4949
//
50-
// On ARM, x86-32, and 32-bit MIPS,
51-
// it is the caller's responsibility to arrange for 64-bit
52-
// alignment of 64-bit words accessed atomically. The first word in a
53-
// variable or in an allocated struct, array, or slice can be relied upon to be
54-
// 64-bit aligned.
50+
// On ARM, 386, and 32-bit MIPS, it is the caller's responsibility
51+
// to arrange for 64-bit alignment of 64-bit words accessed atomically.
52+
// The first word in a variable or in an allocated struct, array, or slice can
53+
// be relied upon to be 64-bit aligned.
5554

5655
// SwapInt32 atomically stores new into *addr and returns the previous *addr value.
5756
func SwapInt32(addr *int32, new int32) (old int32)

src/sync/once.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type Once struct {
1515
// done indicates whether the action has been performed.
1616
// It is first in the struct because it is used in the hot path.
1717
// The hot path is inlined at every call site.
18-
// Placing done first allows more compact instructions on some architectures (amd64/x86),
18+
// Placing done first allows more compact instructions on some architectures (amd64/386),
1919
// and fewer instructions (to calculate offset) on other architectures.
2020
done uint32
2121
m Mutex

0 commit comments

Comments
 (0)