aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/malloc.h
diff options
context:
space:
mode:
authorDmitriy Vyukov <dvyukov@google.com>2014-08-21 20:41:09 +0400
committerDmitriy Vyukov <dvyukov@google.com>2014-08-21 20:41:09 +0400
commit684de0411878ba02c4e949d9c88a0cb8ff0d6a44 (patch)
treeada43b08141bf916745d5052c68b14073f770cdc /src/pkg/runtime/malloc.h
parent6b112c24db0a3c6ddd373c2001129f11f7d9e7f1 (diff)
downloadgo-684de0411878ba02c4e949d9c88a0cb8ff0d6a44.tar.xz
runtime: convert common scheduler functions to Go
These are required for chans, semaphores, timers, etc. LGTM=khr R=golang-codereviews, khr CC=golang-codereviews, rlh, rsc https://golang.org/cl/123640043
Diffstat (limited to 'src/pkg/runtime/malloc.h')
-rw-r--r--src/pkg/runtime/malloc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pkg/runtime/malloc.h b/src/pkg/runtime/malloc.h
index a700956b0c..4485100098 100644
--- a/src/pkg/runtime/malloc.h
+++ b/src/pkg/runtime/malloc.h
@@ -318,6 +318,8 @@ struct StackFreeList
uintptr size; // total size of stacks in list
};
+typedef struct SudoG SudoG;
+
// Per-thread (in Go, per-P) cache for small objects.
// No locking needed because it is per-thread (per-P).
struct MCache
@@ -335,6 +337,8 @@ struct MCache
StackFreeList stackcache[NumStackOrders];
+ SudoG* sudogcache;
+
void* gcworkbuf;
// Local allocator stats, flushed during GC.