diff options
Diffstat (limited to 'src/runtime/darwin/thread.c')
| -rw-r--r-- | src/runtime/darwin/thread.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/runtime/darwin/thread.c b/src/runtime/darwin/thread.c index c780e16197..79267085ed 100644 --- a/src/runtime/darwin/thread.c +++ b/src/runtime/darwin/thread.c @@ -144,13 +144,15 @@ notewakeup(Note *n) void osinit(void) { - // Register our thread-creation callback (see sys_amd64_darwin.s). + // Register our thread-creation callback (see {amd64,386}/sys.s). bsdthread_register(); } void newosproc(M *m, G *g, void *stk, void (*fn)(void)) { + // printf("newosproc m=%p g=%p stk=%p fn=%p\n", m, g, stk, fn); + m->tls[0] = m->id; // so 386 asm can find it bsdthread_create(stk, m, g, fn); } |
