From cba2fe2462fda1fe7b265f8056a89e6f6e06e938 Mon Sep 17 00:00:00 2001 From: "Devon H. O'Dell" Date: Tue, 17 Nov 2009 23:58:51 -0800 Subject: FreeBSD/i386 work This patchset gets Go to pretty much the same state that FreeBSD/amd64 is in. R=rsc http://codereview.appspot.com/157055 Committer: Russ Cox --- src/pkg/runtime/freebsd/thread.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/pkg/runtime/freebsd/thread.c') diff --git a/src/pkg/runtime/freebsd/thread.c b/src/pkg/runtime/freebsd/thread.c index e7cd707d0..a4e1e13e5 100644 --- a/src/pkg/runtime/freebsd/thread.c +++ b/src/pkg/runtime/freebsd/thread.c @@ -125,7 +125,7 @@ void thr_start(void*); void newosproc(M *m, G *g, void *stk, void (*fn)(void)) { - struct thr_param param; + ThrParam param; USED(fn); // thr_start assumes fn == mstart USED(g); // thr_start assumes g == m->g0 @@ -141,8 +141,12 @@ newosproc(M *m, G *g, void *stk, void (*fn)(void)) param.arg = m; param.stack_base = stk; param.stack_size = g->stackbase - g->stackguard + 256; - param.child_tid = (int64*)&m->procid; + param.child_tid = (int32*)&m->procid; param.parent_tid = nil; + param.tls_base = (int8*)&m->tls[0]; + param.tls_size = sizeof m->tls; + + m->tls[0] = m->id; // so 386 asm can find it thr_new(¶m, sizeof param); } -- cgit v1.2.3