summaryrefslogtreecommitdiff
path: root/libthreads
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1998-11-22 18:18:10 +0000
committerRoland McGrath <roland@gnu.org>1998-11-22 18:18:10 +0000
commitd93bc757be8062e275f53659eea8d29057df3275 (patch)
tree05743136561246b44a9635bda6ea3756096e7bd2 /libthreads
parentd536020c53166ecfa2b032fd13e4a9289cedf68b (diff)
1998-11-12 Mark Kettenis <kettenis@phys.uva.nl>
* cthreads.c (cthread_init): Move cthread_alloc call before cproc_init call, since cthread_alloc uses malloc, and malloc won't work between initializing the new stack and switching over to it.
Diffstat (limited to 'libthreads')
-rw-r--r--libthreads/cthreads.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libthreads/cthreads.c b/libthreads/cthreads.c
index 4b55f8b5..9a3341da 100644
--- a/libthreads/cthreads.c
+++ b/libthreads/cthreads.c
@@ -26,6 +26,15 @@
/*
* HISTORY
* $Log: cthreads.c,v $
+ * Revision 1.8 1998/06/10 19:38:01 tb
+ * Tue Jun 9 13:50:09 1998 Thomas Bushnell, n/BSG <tb@mit.edu>
+ *
+ * * cthreads.c (cthread_fork_prepare): Don't call
+ * malloc_fork_prepare since we are no longer providing our own
+ * malloc in this library.
+ * (cthread_fork_parent): Likewise, for malloc_fork_parent.
+ * (cthread_fork_child): Likewize, for malloc_fork_child.
+ *
* Revision 1.7 1997/08/20 19:41:20 thomas
* Wed Aug 20 15:39:44 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
*
@@ -215,9 +224,9 @@ cthread_init()
if (cthreads_started)
return 0;
+ t = cthread_alloc((cthread_fn_t) 0, (any_t) 0);
stack = cproc_init();
cthread_cprocs = 1;
- t = cthread_alloc((cthread_fn_t) 0, (any_t) 0);
#ifdef cthread_md_init
cthread_md_init();