diff options
Diffstat (limited to 'src/runtime/atomic_pointer.go')
| -rw-r--r-- | src/runtime/atomic_pointer.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/runtime/atomic_pointer.go b/src/runtime/atomic_pointer.go index e3d17b5cf8..9711fb208b 100644 --- a/src/runtime/atomic_pointer.go +++ b/src/runtime/atomic_pointer.go @@ -18,6 +18,15 @@ import ( // atomicwb performs a write barrier before an atomic pointer write. // The caller should guard the call with "if writeBarrier.enabled". // +// atomicwb should be an internal detail, +// but widely used packages access it using linkname. +// Notable members of the hall of shame include: +// - github.com/bytedance/gopkg +// +// Do not remove or change the type signature. +// See go.dev/issue/67401. +// +//go:linkname atomicwb //go:nosplit func atomicwb(ptr *unsafe.Pointer, new unsafe.Pointer) { slot := (*uintptr)(unsafe.Pointer(ptr)) |
