[project @ 2004-07-21 10:47:28 by simonmar]
[ghc-hetmet.git] / ghc / rts / StoragePriv.h
index f953613..c829e78 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: StoragePriv.h,v 1.15 2001/07/23 17:23:20 simonmar Exp $
+ * $Id: StoragePriv.h,v 1.26 2004/07/21 10:47:29 simonmar Exp $
  *
  * (c) The GHC Team, 1998-1999
  *
@@ -10,6 +10,8 @@
 #ifndef STORAGEPRIV_H
 #define STORAGEPRIV_H
 
+#include <stddef.h>
+
 #define END_OF_STATIC_LIST stgCast(StgClosure*,1)
 
 extern generation *generations;
@@ -19,42 +21,48 @@ extern step *g0s0;
 extern generation *oldest_gen;
 
 extern void newCAF(StgClosure*);
+extern void newDynCAF(StgClosure *);
 
 extern void move_TSO(StgTSO *src, StgTSO *dest);
-extern StgTSO *relocate_stack(StgTSO *dest, int diff);
+extern StgTSO *relocate_stack(StgTSO *dest, ptrdiff_t diff);
 
 extern StgClosure *static_objects;
 extern StgClosure *scavenged_static_objects;
 
+extern StgWeak *old_weak_ptr_list;
+
 extern StgWeak    *weak_ptr_list;
 extern StgClosure *caf_list;
 
+extern StgTSO *resurrected_threads;
+
 extern bdescr *small_alloc_list;
 extern bdescr *large_alloc_list;
+extern bdescr *pinned_object_block;
 
 extern StgPtr alloc_Hp;
 extern StgPtr alloc_HpLim;
 
 extern bdescr *nursery;
 
-extern nat nursery_blocks;
 extern nat alloc_blocks;
 extern nat alloc_blocks_lim;
 
-extern lnat total_allocated;
+extern ullong total_allocated;
 
 /* Nursery manipulation */
 extern void     allocNurseries ( void );
 extern void     resetNurseries ( void );
 extern bdescr * allocNursery   ( bdescr *last_bd, nat blocks );
 extern void     resizeNursery  ( nat blocks );
+extern void     tidyAllocateLists ( void );
 
 /* Stats 'n' stuff */
 extern lnat calcAllocated  ( void );
 extern lnat calcLive       ( void );
 extern lnat calcNeeded     ( void );
 
-static inline void
+INLINE_HEADER void
 dbl_link_onto(bdescr *bd, bdescr **list)
 {
   bd->link = *list;
@@ -74,21 +82,13 @@ dbl_link_onto(bdescr *bd, bdescr **list)
 #ifdef DEBUG
 extern void memInventory(void);
 extern void checkSanity(void);
+extern nat  countBlocks(bdescr *);
 #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);
+extern void         threadPaused ( StgTSO * );
+extern StgClosure * isAlive      ( StgClosure *p );
+extern void         markCAFs     ( evac_fn evac );
 
 #endif /* STORAGEPRIV_H */