aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/export_test.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-09-03 11:10:38 -0400
committerRuss Cox <rsc@golang.org>2014-09-03 11:10:38 -0400
commit0e07f1c99f7ba8f657eaab49bfe106abddbe93a9 (patch)
tree67691fdac58500e723fca4713fc06caa9d843c7f /src/pkg/runtime/export_test.go
parent2c780a35b986dec270640115fb3f28a9e1affeaf (diff)
downloadgo-0e07f1c99f7ba8f657eaab49bfe106abddbe93a9.tar.xz
runtime: introduce, use funcPC to convert Go func to PC
This removes the ** unsafe hack. Real bug fixed at chan.go:101. LGTM=dave, r, iant R=golang-codereviews, dave, r, iant CC=dvyukov, golang-codereviews, khr https://golang.org/cl/140870044
Diffstat (limited to 'src/pkg/runtime/export_test.go')
-rw-r--r--src/pkg/runtime/export_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/runtime/export_test.go b/src/pkg/runtime/export_test.go
index 5579449c4f..cce9afbef9 100644
--- a/src/pkg/runtime/export_test.go
+++ b/src/pkg/runtime/export_test.go
@@ -86,7 +86,7 @@ func ParForSetup(desc *ParFor, nthr, n uint32, ctx *byte, wait bool, body func(*
mp := acquirem()
mp.ptrarg[0] = unsafe.Pointer(desc)
mp.ptrarg[1] = unsafe.Pointer(ctx)
- mp.ptrarg[2] = **(**unsafe.Pointer)(unsafe.Pointer(&body))
+ mp.ptrarg[2] = unsafe.Pointer(funcPC(body)) // TODO(rsc): Should be a scalar.
mp.scalararg[0] = uintptr(nthr)
mp.scalararg[1] = uintptr(n)
mp.scalararg[2] = 0