summaryrefslogtreecommitdiff
path: root/sysdeps/mach/hurd/ia32/pt-setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mach/hurd/ia32/pt-setup.c')
-rw-r--r--sysdeps/mach/hurd/ia32/pt-setup.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sysdeps/mach/hurd/ia32/pt-setup.c b/sysdeps/mach/hurd/ia32/pt-setup.c
index 7eb223c..5420dc8 100644
--- a/sysdeps/mach/hurd/ia32/pt-setup.c
+++ b/sysdeps/mach/hurd/ia32/pt-setup.c
@@ -1,5 +1,5 @@
/* Setup thread stack. Hurd/i386 version.
- Copyright (C) 2000, 2002, 2005, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2002, 2005, 2007, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -91,12 +91,15 @@ __pthread_setup (struct __pthread *thread,
thread->mcontext.pc = entry_point;
thread->mcontext.sp = stack_setup (thread, start_routine, arg);
+ thread->tcb->self = thread->kernel_thread;
+
ktid = __mach_thread_self ();
if (thread->kernel_thread != ktid)
{
- err = __thread_set_pcsp (thread->kernel_thread,
+ err = __thread_set_pcsptp (thread->kernel_thread,
1, thread->mcontext.pc,
- 1, thread->mcontext.sp);
+ 1, thread->mcontext.sp,
+ 1, thread->tcb);
assert_perror (err);
}
__mach_port_deallocate (__mach_task_self (), ktid);