diff options
author | Miles Bader <miles@gnu.org> | 1997-02-18 22:53:31 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1997-02-18 22:53:31 +0000 |
commit | 262bd6369634636e10c9faa9afae66a0c5330779 (patch) | |
tree | 69a06006f9799a1fd910c5bb809af3f2d37b3da5 /libthreads/i386 | |
parent | 826130611252247cc8457bed994d30661d1f75e3 (diff) |
(cproc_setup):
Correctly leave space at top of stack for account for GNU per-thread
variables.
Diffstat (limited to 'libthreads/i386')
-rw-r--r-- | libthreads/i386/thread.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/libthreads/i386/thread.c b/libthreads/i386/thread.c index 8ba81826..38f91192 100644 --- a/libthreads/i386/thread.c +++ b/libthreads/i386/thread.c @@ -25,7 +25,10 @@ */ /* * HISTORY - * $Log: thread.c,v $ + * $Log: thread.c,v $ + * Revision 1.2 1994/05/04 19:05:26 mib + * entered into RCS + * * Revision 2.6 91/07/31 18:37:07 dbg * Undefine cthread_sp macro around function definition. * [91/07/30 17:36:23 dbg] @@ -52,7 +55,7 @@ */ #ifndef lint -static char rcs_id[] = "$Header: cvs-sans-libpthread/hurd/libthreads/i386/thread.c,v 1.2 1994/05/04 19:05:26 mib Exp $"; +static char rcs_id[] = "$Header: cvs-sans-libpthread/hurd/libthreads/i386/thread.c,v 1.3 1997/02/18 22:53:31 miles Exp $"; #endif not lint @@ -78,7 +81,13 @@ cproc_setup(child, thread, routine) int thread; int routine; { - register int *top = (int *) (child->stack_base + child->stack_size); + extern unsigned int __hurd_threadvar_max; /* GNU */ + register int *top = (int *) + cproc_stack_base (child, + sizeof(ur_cthread_t *) + + /* Account for GNU per-thread variables. */ + __hurd_threadvar_max * + sizeof (long int)); struct i386_thread_state state; register struct i386_thread_state *ts = &state; kern_return_t r; |