diff options
| author | Dmitriy Vyukov <dvyukov@google.com> | 2013-02-21 16:24:38 +0400 |
|---|---|---|
| committer | Dmitriy Vyukov <dvyukov@google.com> | 2013-02-21 16:24:38 +0400 |
| commit | a0955a2aa2a2fcd5352f7e517c3f965e24fd8584 (patch) | |
| tree | 93c191c5b27a0367b42fdc86b9a7a3c414e18599 /src/pkg/runtime/proc.c | |
| parent | c53fab969c31e3f15306a5b5b714928d2fd6b1df (diff) | |
| download | go-a0955a2aa2a2fcd5352f7e517c3f965e24fd8584.tar.xz | |
runtime: split minit() to mpreinit() and minit()
mpreinit() is called on the parent thread and with mcache (can allocate memory),
minit() is called on the child thread and can not allocate memory.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/7389043
Diffstat (limited to 'src/pkg/runtime/proc.c')
| -rw-r--r-- | src/pkg/runtime/proc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c index 67d6dad488..5c36ddf745 100644 --- a/src/pkg/runtime/proc.c +++ b/src/pkg/runtime/proc.c @@ -370,6 +370,8 @@ mcommoninit(M *mp) runtime·callers(1, mp->createstack, nelem(mp->createstack)); + runtime·mpreinit(mp); + // Add to runtime·allm so garbage collector doesn't free m // when it is just in a register or thread-local storage. mp->alllink = runtime·allm; |
