/* -----------------------------------------------------------------------------
- * $Id: StoragePriv.h,v 1.11 2000/11/01 11:41:47 simonmar Exp $
+ * $Id: StoragePriv.h,v 1.15 2001/07/23 17:23:20 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
extern generation *oldest_gen;
extern void newCAF(StgClosure*);
-extern StgTSO *relocate_TSO(StgTSO *src, StgTSO *dest);
+
+extern void move_TSO(StgTSO *src, StgTSO *dest);
+extern StgTSO *relocate_stack(StgTSO *dest, int diff);
+
+extern StgClosure *static_objects;
+extern StgClosure *scavenged_static_objects;
extern StgWeak *weak_ptr_list;
extern StgClosure *caf_list;
dbl_link_onto(bdescr *bd, bdescr **list)
{
bd->link = *list;
- bd->back = NULL;
+ bd->u.back = NULL;
if (*list) {
- (*list)->back = bd; /* double-link the list */
+ (*list)->u.back = bd; /* double-link the list */
}
*list = bd;
}
* A mutable list is ended with END_MUT_LIST, so that we can use NULL
* as an indication that an object is not on a mutable list.
*/
-#define END_MUT_LIST ((StgMutClosure *)(void *)&END_MUT_LIST_closure)
+#define END_MUT_LIST ((StgMutClosure *)(void *)&stg_END_MUT_LIST_closure)
#ifdef DEBUG
extern void memInventory(void);
-extern void checkSanity(nat N);
+extern void checkSanity(void);
#endif
+/*
+ * These three are used by the garbage collector when we have
+ * dynamically-linked object modules. (see ClosureMacros.h,
+ * IS_CODE_PTR etc.).
+ * Defined in Linker.c.
+ */
+int is_dynamically_loaded_code_or_rodata_ptr ( void* p );
+int is_dynamically_loaded_rwdata_ptr ( void* p );
+int is_not_dynamically_loaded_ptr ( void* p );
+
+/* Functions from GC.c
+ */
+void threadPaused(StgTSO *);
+StgClosure *isAlive(StgClosure *p);
+
#endif /* STORAGEPRIV_H */