aboutsummaryrefslogtreecommitdiff
path: root/src/sync/atomic
diff options
context:
space:
mode:
authorcui fliter <imcusg@gmail.com>2023-11-03 21:49:19 +0800
committerGopher Robot <gobot@golang.org>2024-02-26 20:48:55 +0000
commitcab90c84d12c630d3cf86caee6f686857485d483 (patch)
tree97d684fc11a5935986620cea43345f29305ca21e /src/sync/atomic
parent1a4fdb9529f4759aaad9fedbcdb549a636441081 (diff)
downloadgo-cab90c84d12c630d3cf86caee6f686857485d483.tar.xz
sync: add available godoc link
Change-Id: I9bc5fd29b0eec8ceadcfee2116de5e7524ef92c2 Reviewed-on: https://go-review.googlesource.com/c/go/+/539617 Auto-Submit: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Pratt <mpratt@google.com> Run-TryBot: shuang cui <imcusg@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/sync/atomic')
-rw-r--r--src/sync/atomic/value.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sync/atomic/value.go b/src/sync/atomic/value.go
index a57b08a6b8..0cfc5f9496 100644
--- a/src/sync/atomic/value.go
+++ b/src/sync/atomic/value.go
@@ -9,8 +9,8 @@ import (
)
// A Value provides an atomic load and store of a consistently typed value.
-// The zero value for a Value returns nil from Load.
-// Once Store has been called, a Value must not be copied.
+// The zero value for a Value returns nil from [Value.Load].
+// Once [Value.Store] has been called, a Value must not be copied.
//
// A Value must not be copied after first use.
type Value struct {
@@ -41,7 +41,7 @@ func (v *Value) Load() (val any) {
var firstStoreInProgress byte
-// Store sets the value of the Value v to val.
+// Store sets the value of the [Value] v to val.
// All calls to Store for a given Value must use values of the same concrete type.
// Store of an inconsistent type panics, as does Store(nil).
func (v *Value) Store(val any) {
@@ -127,7 +127,7 @@ func (v *Value) Swap(new any) (old any) {
}
}
-// CompareAndSwap executes the compare-and-swap operation for the Value.
+// CompareAndSwap executes the compare-and-swap operation for the [Value].
//
// All calls to CompareAndSwap for a given Value must use values of the same
// concrete type. CompareAndSwap of an inconsistent type panics, as does