aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime2.go
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2015-01-28 14:51:49 -0500
committerAustin Clements <austin@google.com>2015-01-29 17:37:11 +0000
commit6b7b0f9a0cc3d647af3494bfc716bb878211e97e (patch)
tree6c4672460147d59824b1437244e11d69452f6eb5 /src/runtime/runtime2.go
parent7a71726b1f0b54b9241730e4bf7a5073676f17fa (diff)
downloadgo-6b7b0f9a0cc3d647af3494bfc716bb878211e97e.tar.xz
runtime: move all parfor-related code to parfor.go
This cleanup was slated for after the conversion of the runtime to Go. Also improve type and function documentation. Change-Id: I55a16b09e00cf701f246deb69e7ce7e3e04b26e7 Reviewed-on: https://go-review.googlesource.com/3393 Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
Diffstat (limited to 'src/runtime/runtime2.go')
-rw-r--r--src/runtime/runtime2.go30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go
index 6935fcd826..f6b7802de3 100644
--- a/src/runtime/runtime2.go
+++ b/src/runtime/runtime2.go
@@ -439,27 +439,6 @@ type lfnode struct {
pushcnt uintptr
}
-// Parallel for descriptor.
-type parfor struct {
- body unsafe.Pointer // go func(*parfor, uint32), executed for each element
- done uint32 // number of idle threads
- nthr uint32 // total number of threads
- nthrmax uint32 // maximum number of threads
- thrseq uint32 // thread id sequencer
- cnt uint32 // iteration space [0, cnt)
- ctx unsafe.Pointer // arbitrary user context
- wait bool // if true, wait while all threads finish processing,
- // otherwise parfor may return while other threads are still working
- thr *parforthread // array of thread descriptors
- pad uint32 // to align parforthread.pos for 64-bit atomic operations
- // stats
- nsteal uint64
- nstealcnt uint64
- nprocyield uint64
- nosyield uint64
- nsleep uint64
-}
-
// Track memory allocated by code not written in Go during a cgo call,
// so that the garbage collector can see them.
type cgomal struct {
@@ -629,15 +608,6 @@ var (
* so they can be garbage collected if there are no other pointers to nodes.
*/
-/*
- * Parallel for over [0, n).
- * body() is executed for each iteration.
- * nthr - total number of worker threads.
- * ctx - arbitrary user context.
- * if wait=true, threads return from parfor() when all work is done;
- * otherwise, threads can return while other threads are still finishing processing.
- */
-
// for mmap, we only pass the lower 32 bits of file offset to the
// assembly routine; the higher bits (if required), should be provided
// by the assembly routine as 0.