mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: rename fastrand1 to fastrand
Change-Id: I37706ff0a3486827c5b072c95ad890ea87ede847 Reviewed-on: https://go-review.googlesource.com/28210 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
f9dafc742d
commit
2b74de3ed9
27 changed files with 43 additions and 43 deletions
|
|
@ -256,7 +256,7 @@ func makemap(t *maptype, hint int64, h *hmap, bucket unsafe.Pointer) *hmap {
|
|||
h.count = 0
|
||||
h.B = B
|
||||
h.flags = 0
|
||||
h.hash0 = fastrand1()
|
||||
h.hash0 = fastrand()
|
||||
h.buckets = buckets
|
||||
h.oldbuckets = nil
|
||||
h.nevacuate = 0
|
||||
|
|
@ -655,9 +655,9 @@ func mapiterinit(t *maptype, h *hmap, it *hiter) {
|
|||
}
|
||||
|
||||
// decide where to start
|
||||
r := uintptr(fastrand1())
|
||||
r := uintptr(fastrand())
|
||||
if h.B > 31-bucketCntBits {
|
||||
r += uintptr(fastrand1()) << 31
|
||||
r += uintptr(fastrand()) << 31
|
||||
}
|
||||
it.startBucket = r & (uintptr(1)<<h.B - 1)
|
||||
it.offset = uint8(r >> h.B & (bucketCnt - 1))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue