From f08f0f5358480cb34863c8a4cd706637855beded Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 5 May 1994 18:13:57 +0000 Subject: entered into RCS --- libthreads/cthreads.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libthreads/cthreads.c') diff --git a/libthreads/cthreads.c b/libthreads/cthreads.c index 1964c335..d45a02b4 100644 --- a/libthreads/cthreads.c +++ b/libthreads/cthreads.c @@ -213,7 +213,10 @@ cthread_init() p = *(cproc_t *)&ur_cthread_ptr(stack); p->incarnation = t; - mig_init(p); /* enable multi-threaded mig interfaces */ + /* The original CMU code passes P to mig_init. In GNU, mig_init + does not know about cproc_t; instead it expects to be passed the + stack pointer of the initial thread. */ + mig_init((void *) stack); /* enable multi-threaded mig interfaces */ cthreads_started = TRUE; return stack; @@ -447,5 +450,6 @@ cthread_fork_child() p = cproc_self(); p->incarnation = t; + /* XXX needs hacking for GNU */ mig_init(p); /* enable multi-threaded mig interfaces */ } -- cgit v1.2.3