aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/export_test.go
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2015-01-28 15:49:26 -0500
committerAustin Clements <austin@google.com>2015-01-29 17:38:16 +0000
commitebbdf2a14cfb2c694d7ecc815d0adc36c344362a (patch)
tree6160bda17cf8ff48b41b002607b507c228954d2d /src/runtime/export_test.go
parent8e2bb7bb4ab8c15204a995e976ce7d023d0e37bf (diff)
downloadgo-ebbdf2a14cfb2c694d7ecc815d0adc36c344362a.tar.xz
runtime: eliminate parfor ctx field
Prior to the conversion of the runtime to Go, this void* was necessary to get closure information in to C callbacks. There are no more C callbacks and parfor is perfectly capable of invoking a Go closure now, so eliminate ctx and all of its unsafe-ness. (Plus, the runtime currently doesn't use ctx for anything.) Change-Id: I39fc53b7dd3d7f660710abc76b0d831bfc6296d8 Reviewed-on: https://go-review.googlesource.com/3395 Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
Diffstat (limited to 'src/runtime/export_test.go')
-rw-r--r--src/runtime/export_test.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/runtime/export_test.go b/src/runtime/export_test.go
index 3b13b7bb38..51798efe0b 100644
--- a/src/runtime/export_test.go
+++ b/src/runtime/export_test.go
@@ -41,7 +41,6 @@ type ParFor struct {
Nthr uint32
thrseq uint32
Cnt uint32
- Ctx *byte
wait bool
}
@@ -53,9 +52,9 @@ func NewParFor(nthrmax uint32) *ParFor {
return desc
}
-func ParForSetup(desc *ParFor, nthr, n uint32, ctx *byte, wait bool, body func(*ParFor, uint32)) {
+func ParForSetup(desc *ParFor, nthr, n uint32, wait bool, body func(*ParFor, uint32)) {
systemstack(func() {
- parforsetup((*parfor)(unsafe.Pointer(desc)), nthr, n, unsafe.Pointer(ctx), wait,
+ parforsetup((*parfor)(unsafe.Pointer(desc)), nthr, n, wait,
*(*func(*parfor, uint32))(unsafe.Pointer(&body)))
})
}