/* -----------------------------------------------------------------------------
- * $Id: Storage.c,v 1.34 2001/01/29 17:23:41 simonmar Exp $
+ * $Id: Storage.c,v 1.37 2001/03/22 03:51:10 hwloidl Exp $
*
* (c) The GHC Team, 1998-1999
*
*/
ACQUIRE_LOCK(&sm_mutex);
-#ifdef GHCI
if (is_dynamically_loaded_rwdata_ptr((StgPtr)caf)) {
((StgIndStatic *)caf)->saved_info = (StgInfoTable *)caf->header.info;
((StgIndStatic *)caf)->static_link = caf_list;
((StgMutClosure *)caf)->mut_link = oldest_gen->mut_once_list;
oldest_gen->mut_once_list = (StgMutClosure *)caf;
}
-#else
- ASSERT( ((StgMutClosure*)caf)->mut_link == NULL );
- ((StgMutClosure *)caf)->mut_link = oldest_gen->mut_once_list;
- oldest_gen->mut_once_list = (StgMutClosure *)caf;
-#endif
RELEASE_LOCK(&sm_mutex);
-}
-
-#ifdef GHCI
-void
-markCafs( void )
-{
- StgClosure *p;
- for (p = caf_list; p != NULL; p = STATIC_LINK2(get_itbl(p),p)) {
- MarkRoot(p);
- }
+#ifdef PAR
+ /* If we are PAR or DIST then we never forget a CAF */
+ { globalAddr *newGA;
+ //belch("<##> Globalising CAF %08x %s",caf,info_type(caf));
+ newGA=makeGlobal(caf,rtsTrue); /*given full weight*/
+ ASSERT(newGA);
+ }
+#endif PAR
}
-#endif /* GHCI */
/* -----------------------------------------------------------------------------
Nursery management.