summaryrefslogtreecommitdiff
path: root/libthreads
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1994-05-05 18:13:57 +0000
committerRoland McGrath <roland@gnu.org>1994-05-05 18:13:57 +0000
commitf08f0f5358480cb34863c8a4cd706637855beded (patch)
tree57b26a08818f75b5cd76224d0bdd073ebb42daf4 /libthreads
parent02d52cea1a6e407c3c9664f331d973537d90a91b (diff)
entered into RCS
Diffstat (limited to 'libthreads')
-rw-r--r--libthreads/cthreads.c6
1 files changed, 5 insertions, 1 deletions
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 */
}