aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/runtime.h
diff options
context:
space:
mode:
authorDmitriy Vyukov <dvyukov@google.com>2013-02-27 21:17:53 +0200
committerDmitriy Vyukov <dvyukov@google.com>2013-02-27 21:17:53 +0200
commit6cdfb00f4ed2abcbe4dd58dd640a584c17484a61 (patch)
tree5ccbe6cbe0c01736b1e5ec10c4f1807b6ffb3169 /src/pkg/runtime/runtime.h
parent43c04ba1b8c81114d09c0f9f326987070e0ee291 (diff)
downloadgo-6cdfb00f4ed2abcbe4dd58dd640a584c17484a61.tar.xz
runtime: more changes in preparation to the new scheduler
add per-P cache of dead G's add global runnable queue (not used for now) add list of idle P's (not used for now) R=golang-dev, rsc CC=golang-dev https://golang.org/cl/7397061
Diffstat (limited to 'src/pkg/runtime/runtime.h')
-rw-r--r--src/pkg/runtime/runtime.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h
index 6d7a3152ff..11f4557802 100644
--- a/src/pkg/runtime/runtime.h
+++ b/src/pkg/runtime/runtime.h
@@ -317,11 +317,19 @@ struct P
{
Lock;
+ P* link;
+
// Queue of runnable goroutines.
G** runq;
int32 runqhead;
int32 runqtail;
int32 runqsize;
+
+ // Available G's (status == Gdead)
+ G* gfree;
+ int32 gfreecnt;
+
+ byte pad[64];
};
// The m->locked word holds a single bit saying whether