mirror of
https://github.com/golang/go
synced 2024-11-19 11:04:47 -07:00
runtime: fix comment (lost in shuffle)
TBR=dvyukov CC=golang-dev https://golang.org/cl/4710041
This commit is contained in:
parent
c9152a8568
commit
88e0c0517a
@ -210,8 +210,11 @@ runtime·idlegoroutine(void)
|
||||
static void
|
||||
mcommoninit(M *m)
|
||||
{
|
||||
// Add to runtime·allm so garbage collector doesn't free m
|
||||
// when it is just in a register or thread-local storage.
|
||||
m->alllink = runtime·allm;
|
||||
runtime·allm = m;
|
||||
|
||||
m->id = runtime·sched.mcount++;
|
||||
m->fastrand = 0x49f6428aUL + m->id;
|
||||
m->stackalloc = runtime·malloc(sizeof(*m->stackalloc));
|
||||
@ -502,8 +505,6 @@ matchmg(void)
|
||||
// Find the m that will run g.
|
||||
if((m = mget(g)) == nil){
|
||||
m = runtime·malloc(sizeof(M));
|
||||
// Add to runtime·allm so garbage collector doesn't free m
|
||||
// when it is just in a register or thread-local storage.
|
||||
mcommoninit(m);
|
||||
|
||||
if(runtime·iscgo) {
|
||||
|
Loading…
Reference in New Issue
Block a user