From: sof Date: Wed, 26 Mar 2003 17:33:49 +0000 (+0000) Subject: [project @ 2003-03-26 17:33:49 by sof] X-Git-Tag: Approx_11550_changesets_converted~1027 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=6e9ec12de7a723ac6334228dd30f84b5125554d9;p=ghc-hetmet.git [project @ 2003-03-26 17:33:49 by sof] initStorage(): sm_mutex not correctly initialised (guess no one's done an SMP build for the past 12 months :) --- diff --git a/ghc/rts/Storage.c b/ghc/rts/Storage.c index 4e7cdb6..84d959b 100644 --- a/ghc/rts/Storage.c +++ b/ghc/rts/Storage.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Storage.c,v 1.77 2003/03/21 16:18:38 sof Exp $ + * $Id: Storage.c,v 1.78 2003/03/26 17:33:49 sof Exp $ * * (c) The GHC Team, 1998-1999 * @@ -73,13 +73,13 @@ initStorage( void ) return; } - /* Sanity check to make sure the LOOKS_LIKE_ macros appear to be - * doing something reasonable. - */ - ASSERT(LOOKS_LIKE_INFO_PTR(&stg_BLACKHOLE_info)); - ASSERT(LOOKS_LIKE_CLOSURE_PTR(&stg_dummy_ret_closure)); - ASSERT(!HEAP_ALLOCED(&stg_dummy_ret_closure)); - + /* Sanity check to make sure the LOOKS_LIKE_ macros appear to be + * doing something reasonable. + */ + ASSERT(LOOKS_LIKE_INFO_PTR(&stg_BLACKHOLE_info)); + ASSERT(LOOKS_LIKE_CLOSURE_PTR(&stg_dummy_ret_closure)); + ASSERT(!HEAP_ALLOCED(&stg_dummy_ret_closure)); + if (RtsFlags.GcFlags.maxHeapSize != 0 && RtsFlags.GcFlags.heapSizeSuggestion > RtsFlags.GcFlags.maxHeapSize) { @@ -96,7 +96,7 @@ initStorage( void ) initBlockAllocator(); #if defined(SMP) - initCondition(&sm_mutex); + initMutex(&sm_mutex); #endif /* allocate generation info array */ @@ -209,10 +209,6 @@ initStorage( void ) /* Tell GNU multi-precision pkg about our custom alloc functions */ mp_set_memory_functions(stgAllocForGMP, stgReallocForGMP, stgDeallocForGMP); -#if defined(SMP) - initMutex(&sm_mutex); -#endif - IF_DEBUG(gc, statDescribeGens()); }