diff options
author | Michael Stapelberg <stapelberg@debian.org> | 2014-06-19 09:23:02 +0200 |
---|---|---|
committer | Michael Stapelberg <stapelberg@debian.org> | 2014-06-19 09:23:02 +0200 |
commit | 8fcc691d6fa80c9ddf38bf0d34b803bab0e421d5 (patch) | |
tree | ba71646a10b518372d110532d86fcf0b98edc14f /src/pkg/runtime/parfor.c | |
parent | 3bb719bbf3cdb97b3901f3baaa2da9d02a5c3cdb (diff) | |
parent | 8a39ee361feb9bf46d728ff1ba4f07ca1d9610b1 (diff) | |
download | golang-8fcc691d6fa80c9ddf38bf0d34b803bab0e421d5.tar.gz |
Merge tag 'upstream/1.3' into debian-sid
Upstream version 1.3
Diffstat (limited to 'src/pkg/runtime/parfor.c')
-rw-r--r-- | src/pkg/runtime/parfor.c | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/src/pkg/runtime/parfor.c b/src/pkg/runtime/parfor.c index ceaac8bc9..4706e0a43 100644 --- a/src/pkg/runtime/parfor.c +++ b/src/pkg/runtime/parfor.c @@ -33,15 +33,6 @@ runtime·parforalloc(uint32 nthrmax) return desc; } -// For testing from Go -// func parforalloc2(nthrmax uint32) *ParFor -void -runtime·parforalloc2(uint32 nthrmax, ParFor *desc) -{ - desc = runtime·parforalloc(nthrmax); - FLUSH(&desc); -} - void runtime·parforsetup(ParFor *desc, uint32 nthr, uint32 n, void *ctx, bool wait, void (*body)(ParFor*, uint32)) { @@ -75,14 +66,6 @@ runtime·parforsetup(ParFor *desc, uint32 nthr, uint32 n, void *ctx, bool wait, } } -// For testing from Go -// func parforsetup2(desc *ParFor, nthr, n uint32, ctx *byte, wait bool, body func(*ParFor, uint32)) -void -runtime·parforsetup2(ParFor *desc, uint32 nthr, uint32 n, void *ctx, bool wait, void *body) -{ - runtime·parforsetup(desc, nthr, n, ctx, wait, *(void(**)(ParFor*, uint32))body); -} - void runtime·parfordo(ParFor *desc) { @@ -207,13 +190,10 @@ exit: me->nsleep = 0; } -// For testing from Go -// func parforiters(desc *ParFor, tid uintptr) (uintptr, uintptr) +// For testing from Go. void -runtime·parforiters(ParFor *desc, uintptr tid, uintptr start, uintptr end) +runtime·parforiters(ParFor *desc, uintptr tid, uintptr *start, uintptr *end) { - start = (uint32)desc->thr[tid].pos; - end = (uint32)(desc->thr[tid].pos>>32); - FLUSH(&start); - FLUSH(&end); + *start = (uint32)desc->thr[tid].pos; + *end = (uint32)(desc->thr[tid].pos>>32); } |