mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.typeparams] runtime: replace uses of runtime/internal/sys.PtrSize with internal/goarch.PtrSize [generated]
[git-generate] cd src/runtime/internal/math gofmt -w -r "sys.PtrSize -> goarch.PtrSize" . goimports -w *.go cd ../.. gofmt -w -r "sys.PtrSize -> goarch.PtrSize" . goimports -w *.go Change-Id: I43491cdd54d2e06d4d04152b3d213851b7d6d423 Reviewed-on: https://go-review.googlesource.com/c/go/+/328337 Trust: Michael Knyszek <mknyszek@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
122f5e16d6
commit
6d85891b29
63 changed files with 349 additions and 336 deletions
|
|
@ -6,7 +6,7 @@ package runtime
|
|||
|
||||
import (
|
||||
"runtime/internal/atomic"
|
||||
"runtime/internal/sys"
|
||||
"internal/goarch"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
|
@ -505,7 +505,7 @@ const (
|
|||
// tlsSlots is the number of pointer-sized slots reserved for TLS on some platforms,
|
||||
// like Windows.
|
||||
tlsSlots = 6
|
||||
tlsSize = tlsSlots * sys.PtrSize
|
||||
tlsSize = tlsSlots * goarch.PtrSize
|
||||
)
|
||||
|
||||
type m struct {
|
||||
|
|
@ -930,7 +930,7 @@ func extendRandom(r []byte, n int) {
|
|||
w = 16
|
||||
}
|
||||
h := memhash(unsafe.Pointer(&r[n-w]), uintptr(nanotime()), uintptr(w))
|
||||
for i := 0; i < sys.PtrSize && n < len(r); i++ {
|
||||
for i := 0; i < goarch.PtrSize && n < len(r); i++ {
|
||||
r[n] = byte(h)
|
||||
n++
|
||||
h >>= 8
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue