aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime/proc.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2012-03-02 16:38:43 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2012-03-02 16:38:43 +0000
commitcbb6491d76c7aa81cdf5d3b3a81386129c5e2fce (patch)
treeefa0c55763b34cbc633bc494c2743d1b5d9aaff3 /libgo/runtime/proc.c
parentff2f581b00ac6759f6366c16ef902c935163aa13 (diff)
downloadgcc-cbb6491d76c7aa81cdf5d3b3a81386129c5e2fce.zip
gcc-cbb6491d76c7aa81cdf5d3b3a81386129c5e2fce.tar.gz
gcc-cbb6491d76c7aa81cdf5d3b3a81386129c5e2fce.tar.bz2
libgo: Update to weekly.2012-02-14 release.
From-SVN: r184798
Diffstat (limited to 'libgo/runtime/proc.c')
-rw-r--r--libgo/runtime/proc.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c
index d7e1e5f..a4e4588 100644
--- a/libgo/runtime/proc.c
+++ b/libgo/runtime/proc.c
@@ -536,18 +536,20 @@ 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_Cgocalls() iterates over allm w/o schedlock,
- // so we need to publish it safely.
- runtime_atomicstorep((void**)&runtime_allm, m);
-
m->id = runtime_sched.mcount++;
m->fastrand = 0x49f6428aUL + m->id + runtime_cputicks();
if(m->mcache == nil)
m->mcache = runtime_allocmcache();
+
+ runtime_callers(1, m->createstack, nelem(m->createstack));
+
+ // 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_Cgocalls() iterates over allm w/o schedlock,
+ // so we need to publish it safely.
+ runtime_atomicstorep(&runtime_allm, m);
}
// Try to increment mcpu. Report whether succeeded.