diff options
author | Cherry Zhang <cherryyz@google.com> | 2021-01-28 14:57:55 -0500 |
---|---|---|
committer | Cherry Zhang <cherryyz@google.com> | 2021-01-29 19:11:07 +0000 |
commit | 68058edc39edae96e34225ca163002233b623c97 (patch) | |
tree | 91575d0d1ffbde63ed98642fc94c629a02d60a37 /src/runtime/memclr_riscv64.s | |
parent | c8bd8010ff7c0115bf186443119216ba51f09d2b (diff) | |
download | go-68058edc39edae96e34225ca163002233b623c97.tar.gz go-68058edc39edae96e34225ca163002233b623c97.zip |
runtime: document pointer write atomicity for memclrNoHeapPointers
memclrNoHeapPointers is the underlying implementation of
typedmemclr and memclrHasPointers, so it still needs to write
pointer-aligned words atomically. Document this requirement.
Updates #41428.
Change-Id: Ice00dee5de7a96a50e51ff019fcef069e8a8406a
Reviewed-on: https://go-review.googlesource.com/c/go/+/287692
Trust: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/runtime/memclr_riscv64.s')
-rw-r--r-- | src/runtime/memclr_riscv64.s | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/runtime/memclr_riscv64.s b/src/runtime/memclr_riscv64.s index ba7704e805..54ddaa4560 100644 --- a/src/runtime/memclr_riscv64.s +++ b/src/runtime/memclr_riscv64.s @@ -4,6 +4,8 @@ #include "textflag.h" +// See memclrNoHeapPointers Go doc for important implementation constraints. + // void runtime·memclrNoHeapPointers(void*, uintptr) TEXT runtime·memclrNoHeapPointers(SB),NOSPLIT,$0-16 MOV ptr+0(FP), T1 |