From d93bc757be8062e275f53659eea8d29057df3275 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 22 Nov 1998 18:18:10 +0000 Subject: 1998-11-12 Mark Kettenis * 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. --- libthreads/cthreads.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'libthreads') 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 + * + * * 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 * @@ -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(); -- cgit v1.2.3