diff options
| author | Dmitriy Vyukov <dvyukov@google.com> | 2014-08-21 20:41:09 +0400 |
|---|---|---|
| committer | Dmitriy Vyukov <dvyukov@google.com> | 2014-08-21 20:41:09 +0400 |
| commit | 684de0411878ba02c4e949d9c88a0cb8ff0d6a44 (patch) | |
| tree | ada43b08141bf916745d5052c68b14073f770cdc /src/pkg/runtime/malloc.h | |
| parent | 6b112c24db0a3c6ddd373c2001129f11f7d9e7f1 (diff) | |
| download | go-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.h | 4 |
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. |
