diff options
| author | Russ Cox <rsc@golang.org> | 2013-03-01 11:44:43 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2013-03-01 11:44:43 -0500 |
| commit | e6a3e22c7569f7581f9a3dea3229ff6d0eda15e8 (patch) | |
| tree | b1de33adeeb1f1bb77d033b608d6ce14f89e6bc8 /src/pkg/runtime/thread_linux.c | |
| parent | d0d7416d3f9065141e1abe85528803afa9217371 (diff) | |
| download | go-e6a3e22c7569f7581f9a3dea3229ff6d0eda15e8.tar.xz | |
runtime: start all threads with runtime.mstart
Putting the M initialization in multiple places will not scale.
Various code assumes mstart is the start already. Make it so.
R=golang-dev, devon.odell
CC=golang-dev
https://golang.org/cl/7420048
Diffstat (limited to 'src/pkg/runtime/thread_linux.c')
| -rw-r--r-- | src/pkg/runtime/thread_linux.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pkg/runtime/thread_linux.c b/src/pkg/runtime/thread_linux.c index 3f45058069..78ddef878b 100644 --- a/src/pkg/runtime/thread_linux.c +++ b/src/pkg/runtime/thread_linux.c @@ -124,7 +124,7 @@ enum }; void -runtime·newosproc(M *mp, G *gp, void *stk, void (*fn)(void)) +runtime·newosproc(M *mp, void *stk) { int32 ret; int32 flags; @@ -142,14 +142,14 @@ runtime·newosproc(M *mp, G *gp, void *stk, void (*fn)(void)) mp->tls[0] = mp->id; // so 386 asm can find it if(0){ - runtime·printf("newosproc stk=%p m=%p g=%p fn=%p clone=%p id=%d/%d ostk=%p\n", - stk, mp, gp, fn, runtime·clone, mp->id, (int32)mp->tls[0], &mp); + runtime·printf("newosproc stk=%p m=%p g=%p clone=%p id=%d/%d ostk=%p\n", + stk, mp, mp->g0, runtime·clone, mp->id, (int32)mp->tls[0], &mp); } // Disable signals during clone, so that the new thread starts // with signals disabled. It will enable them in minit. runtime·rtsigprocmask(SIG_SETMASK, &sigset_all, &oset, sizeof oset); - ret = runtime·clone(flags, stk, mp, gp, fn); + ret = runtime·clone(flags, stk, mp, mp->g0, runtime·mstart); runtime·rtsigprocmask(SIG_SETMASK, &oset, nil, sizeof oset); if(ret < 0) { |
