<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go/src/runtime/atomic_pointer.go, branch makepkg</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=makepkg</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=makepkg'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2025-03-11T19:26:32Z</updated>
<entry>
<title>runtime/internal: clean up completely</title>
<updated>2025-03-11T19:26:32Z</updated>
<author>
<name>Jes Cok</name>
<email>xigua67damn@gmail.com</email>
</author>
<published>2025-03-07T01:04:13Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=31658ace9d277b7322413e9c3a21528bdc6db884'/>
<id>urn:sha1:31658ace9d277b7322413e9c3a21528bdc6db884</id>
<content type='text'>
We've been slowly moving packages from runtime/internal to
internal/runtime. For now, runtime/internal only has test packages.

It's a good chance to clean up the references to runtime/internal
in the toolchain.

For #65355.

Change-Id: Ie6f9091a44511d0db9946ea6de7a78d3afe9f063
GitHub-Last-Rev: fad32e2e81d11508e734c3c3d3b0c1da583f89f5
GitHub-Pull-Request: golang/go#72137
Reviewed-on: https://go-review.googlesource.com/c/go/+/655515
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: David Chase &lt;drchase@google.com&gt;
</content>
</entry>
<entry>
<title>all: document legacy //go:linkname for modules with ≥100 dependents</title>
<updated>2024-05-29T16:25:21Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2024-05-22T21:09:02Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=9a8995b8b6a08d5fe01122771f962b36336f8aec'/>
<id>urn:sha1:9a8995b8b6a08d5fe01122771f962b36336f8aec</id>
<content type='text'>
For #67401.

Change-Id: I015408a3f437c1733d97160ef2fb5da6d4efcc5c
Reviewed-on: https://go-review.googlesource.com/c/go/+/587598
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Auto-Submit: Russ Cox &lt;rsc@golang.org&gt;
</content>
</entry>
<entry>
<title>all: document legacy //go:linkname for modules with ≥500 dependents</title>
<updated>2024-05-23T01:16:53Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2024-05-22T19:03:13Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=05cbbf985fed823a174bf95cc78a7d44f948fdab'/>
<id>urn:sha1:05cbbf985fed823a174bf95cc78a7d44f948fdab</id>
<content type='text'>
For #67401.

Change-Id: I7dd28c3b01a1a647f84929d15412aa43ab0089ee
Reviewed-on: https://go-review.googlesource.com/c/go/+/587575
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
Auto-Submit: Russ Cox &lt;rsc@golang.org&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
</content>
</entry>
<entry>
<title>runtime: migrate internal/atomic to internal/runtime</title>
<updated>2024-03-25T19:53:03Z</updated>
<author>
<name>Andy Pan</name>
<email>panjf2000@gmail.com</email>
</author>
<published>2024-02-01T02:21:14Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=4c2b1e0feb3d3112da94fa4cd11ebe995003fa89'/>
<id>urn:sha1:4c2b1e0feb3d3112da94fa4cd11ebe995003fa89</id>
<content type='text'>
For #65355

Change-Id: I65dd090fb99de9b231af2112c5ccb0eb635db2be
Reviewed-on: https://go-review.googlesource.com/c/go/+/560155
Reviewed-by: David Chase &lt;drchase@google.com&gt;
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Ibrahim Bazoka &lt;ibrahimbazoka729@gmail.com&gt;
Auto-Submit: Emmanuel Odeke &lt;emmanuel@orijtech.com&gt;
</content>
</entry>
<entry>
<title>runtime: remove the restriction that write barrier ptrs come in pairs</title>
<updated>2023-02-17T22:19:26Z</updated>
<author>
<name>Keith Randall</name>
<email>khr@golang.org</email>
</author>
<published>2022-10-26T00:58:07Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=d3daeb5267b626db36adf2f39c36f6caf94447e3'/>
<id>urn:sha1:d3daeb5267b626db36adf2f39c36f6caf94447e3</id>
<content type='text'>
Future CLs will remove the invariant that pointers are always put in
the write barrier in pairs.

The behavior of the assembly code changes a bit, where instead of writing
the pointers unconditionally and then checking for overflow, check for
overflow first and then write the pointers.

Also changed the write barrier flush function to not take the src/dst
as arguments.

Change-Id: I2ef708038367b7b82ea67cbaf505a1d5904c775c
Reviewed-on: https://go-review.googlesource.com/c/go/+/447779
Run-TryBot: Keith Randall &lt;khr@golang.org&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
TryBot-Bypass: Keith Randall &lt;khr@golang.org&gt;
</content>
</entry>
<entry>
<title>runtime: reimplement GODEBUG=cgocheck=2 as a GOEXPERIMENT</title>
<updated>2023-02-16T00:16:24Z</updated>
<author>
<name>Keith Randall</name>
<email>khr@golang.org</email>
</author>
<published>2022-10-20T21:20:41Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=55044288ad22f0c46ac55375ed9ef3de1babb77c'/>
<id>urn:sha1:55044288ad22f0c46ac55375ed9ef3de1babb77c</id>
<content type='text'>
Move this knob from a binary-startup thing to a build-time thing.
This will enable followon optmizations to the write barrier.

Change-Id: Ic3323348621c76a7dc390c09ff55016b19c43018
Reviewed-on: https://go-review.googlesource.com/c/go/+/447778
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
Run-TryBot: Keith Randall &lt;khr@golang.org&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
</content>
</entry>
<entry>
<title>runtime/internal/atomic: add write barrier-enabled pointer atomics</title>
<updated>2022-10-18T14:48:54Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2022-10-17T19:33:29Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=9fedc481ea09a0539cd2669312429ef5416a8949'/>
<id>urn:sha1:9fedc481ea09a0539cd2669312429ef5416a8949</id>
<content type='text'>
UnsafePointer.Store, UnsafePointer.CompareAndSwap were missing,
although .StoreNoWB and .CompareAndSwapNoWB existed.
Same for Pointer[T}.

Do the linkname tricks necessary to add those methods.

Change-Id: I925ee27673288accb15ebe93898f9eb01ab46a98
Reviewed-on: https://go-review.googlesource.com/c/go/+/443379
Auto-Submit: Russ Cox &lt;rsc@golang.org&gt;
Reviewed-by: Austin Clements &lt;austin@google.com&gt;
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>runtime: remove unused function casp</title>
<updated>2018-08-22T22:43:12Z</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2018-02-12T19:22:00Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=6ebc31f9fb0ade22c605c146f651f18f9fc0b61d'/>
<id>urn:sha1:6ebc31f9fb0ade22c605c146f651f18f9fc0b61d</id>
<content type='text'>
Change-Id: I7c9c83ba236e1050e04377a7591fef7174df698b
Reviewed-on: https://go-review.googlesource.com/130415
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</content>
</entry>
<entry>
<title>runtime: eliminate all writebarrierptr* calls</title>
<updated>2018-02-13T16:34:45Z</updated>
<author>
<name>Austin Clements</name>
<email>austin@google.com</email>
</author>
<published>2018-01-15T05:00:02Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=245310883dcae717bb662b22d5b1fd07fdd59b76'/>
<id>urn:sha1:245310883dcae717bb662b22d5b1fd07fdd59b76</id>
<content type='text'>
Calls to writebarrierptr can simply be actual pointer writes. Calls to
writebarrierptr_prewrite need to go through the write barrier buffer.

Updates #22460.

Change-Id: I92cee4da98c5baa499f1977563757c76f95bf0ca
Reviewed-on: https://go-review.googlesource.com/92704
Run-TryBot: Austin Clements &lt;austin@google.com&gt;
Reviewed-by: Rick Hudson &lt;rlh@golang.org&gt;
</content>
</entry>
<entry>
<title>runtime: perform write barrier before pointer write</title>
<updated>2016-10-28T20:47:52Z</updated>
<author>
<name>Austin Clements</name>
<email>austin@google.com</email>
</author>
<published>2016-08-22T20:02:54Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=8f81dfe8b47e975b90bb4a2f8dd314d32c633176'/>
<id>urn:sha1:8f81dfe8b47e975b90bb4a2f8dd314d32c633176</id>
<content type='text'>
Currently, we perform write barriers after performing pointer writes.
At the moment, it simply doesn't matter what order this happens in, as
long as they appear atomic to GC. But both the hybrid barrier and ROC
are going to require a pre-write write barrier.

For the hybrid barrier, this is important because the barrier needs to
observe both the current value of the slot and the value that will be
written to it. (Alternatively, the caller could do the write and pass
in the old value, but it seems easier and more useful to just swap the
order of the barrier and the write.)

For ROC, this is necessary because, if the pointer write is going to
make the pointer reachable to some goroutine that it currently is not
visible to, the garbage collector must take some special action before
that pointer becomes more broadly visible.

This commits swaps pointer writes around so the write barrier occurs
before the pointer write.

The main subtlety here is bulk memory writes. Currently, these copy to
the destination first and then use the pointer bitmap of the
destination to find the copied pointers and invoke the write barrier.
This is necessary because the source may not have a pointer bitmap. To
handle these, we pass both the source and the destination to the bulk
memory barrier, which uses the pointer bitmap of the destination, but
reads the pointer values from the source.

Updates #17503.

Change-Id: I78ecc0c5c94ee81c29019c305b3d232069294a55
Reviewed-on: https://go-review.googlesource.com/31763
Reviewed-by: Rick Hudson &lt;rlh@golang.org&gt;
</content>
</entry>
</feed>
