aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/hashmap.go
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josharian@gmail.com>2016-06-28 09:22:46 -0700
committerJosh Bleecher Snyder <josharian@gmail.com>2016-08-30 23:59:21 +0000
commit2b74de3ed91c495d63868acef0471b0286e7b432 (patch)
tree89478aa9441c37a24a5ca15c9750eefbff80bbfe /src/runtime/hashmap.go
parentf9dafc742d7c0e892b6e4ff17cb9ec7165887e44 (diff)
downloadgo-2b74de3ed91c495d63868acef0471b0286e7b432.tar.xz
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>
Diffstat (limited to 'src/runtime/hashmap.go')
-rw-r--r--src/runtime/hashmap.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/hashmap.go b/src/runtime/hashmap.go
index f756e7b603..9d8c2f8a60 100644
--- a/src/runtime/hashmap.go
+++ b/src/runtime/hashmap.go
@@ -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))