[project @ 1996-06-30 16:31:21 by partain]
[ghc-hetmet.git] / ghc / includes / SMinterface.lh
index 0622d4d..a6c4c0f 100644 (file)
@@ -54,10 +54,10 @@ typedef struct {
 #endif
 
 #ifndef PAR
-    P_ MallocPtrList;     /* List of all Malloc Pointers (in new generation) */
+    P_ ForeignObjList;     /* List of all Foreign objects (in new generation) */
 
 #if defined(GCap) || defined(GCgn)
-    P_ OldMallocPtrList;  /* List of all Malloc Pointers in old generation */
+    P_ OldForeignObjList;  /* List of all Foreign objects in old generation */
 #endif
 
     P_ StablePointerTable;
@@ -82,9 +82,8 @@ Answer: They're on the heap in a "Stable Pointer Table". (ADR)
 #else
 # ifndef PAR
 #   ifdef GRAN
-#    define SM_MAXROOTS (10 + (MAX_PROC*4) + 2 + (MAX_PROC*2) + MAX_SPARKS)
-                               /* unthreaded + spark/thread queues + Current/Main TSOs
-                                  + events + sparks */
+#    define SM_MAXROOTS (10 + (MAX_PROC*2) + 2 )
+                    /* unthreaded + hd/tl thread queues + Current/Main TSOs */
 #   else
 #     define SM_MAXROOTS 5      /* See c-as-asm/HpOverflow.lc */
 #   endif
@@ -96,22 +95,22 @@ Answer: They're on the heap in a "Stable Pointer Table". (ADR)
 
 The storage manager is accessed exclusively through these routines:
 \begin{code}
-IF_RTS(I_ initSM           PROTO((I_ rts_argc, char **rts_argv, FILE *statsfile));)
-IF_RTS(I_ exitSM           PROTO((smInfo *sm));)
-IF_RTS(I_ initStacks       PROTO((smInfo *sm));)
-IF_RTS(I_ initHeap         PROTO((smInfo *sm));)
+IF_RTS(void    initSM      (STG_NO_ARGS);)
+IF_RTS(rtsBool exitSM      PROTO((smInfo *sm));)
+IF_RTS(rtsBool initStacks   PROTO((smInfo *sm));)
+IF_RTS(rtsBool initHeap            PROTO((smInfo *sm));)
 #ifdef CONCURRENT
-IF_RTS(rtsBool initThreadPool PROTO((I_ size));)
+IF_RTS(rtsBool initThreadPools (STG_NO_ARGS);)
 #endif
 #ifdef PAR
 IF_RTS(void init_gr_profiling PROTO((int, char **, int, char **));)
 #endif
 
-I_ collectHeap     PROTO((W_ reqsize, smInfo *sm, rtsBool do_full_collection));
+I_ collectHeap PROTO((W_ reqsize, smInfo *sm, rtsBool do_full_collection));
 
 IF_RTS(void unmapMiddleStackPage PROTO((char *, int));) /* char * == caddr_t ? */
 
-#if defined(USE_COST_CENTRES) || defined(GUM)
+#if defined(PROFILING) || defined(PAR)
 IF_RTS(void handle_tick_serial(STG_NO_ARGS);)
 IF_RTS(void handle_tick_noserial(STG_NO_ARGS);)
 #endif
@@ -125,15 +124,11 @@ void        end_init(STG_NO_ARGS);
 
 #ifdef PAR
 void EvacuateLocalGAs PROTO((rtsBool full));
-void RebuildGAtables PROTO((rtsBool full));
+void RebuildGAtables  PROTO((rtsBool full));
 #endif
-
 \end{code}
 
-@initSM@ processes any runtime parameters directed towards the storage
-manager. The @statsfile@ parameter is an open file, which will contain
-any garbage collection statistics requested by the user.  This file
-must be opened for writing.
+@initSM@ finalizes any runtime parameters of the storage manager.
 
 @exitSM@ does any cleaning up required by the storage manager before
 the program is executed. Its main purpose is to print any summary
@@ -153,7 +148,7 @@ roots.  If we are using Appel's collector it also initialises the
 @OldLim@ field.
 
 In the sequential system, it also initialises the stable pointer table
-and the @MallocPtr@ (and @OldMallocPtrList@) fields.
+and the @ForeignObjList@ (and @OldForeignObjList@) fields.
 
 @collectHeap@ invokes the garbage collector that was requested at
 compile time. @reqsize@ is the size of the request (in words) that
@@ -200,9 +195,9 @@ B stack arising from any update frame ``squeezing'' [sequential only].
 \item The elements of @CAFlist@ and the stable pointers will be
 updated to point to the new locations of the closures they reference.
 
-\item Any members of @MallocPtrList@ which became garbage should have
-been reported (by calling @FreeMallocPtr@; and the @(Old)MallocPtrList@
-updated to contain only those Malloc Pointers which are still live.
+\item Any members of @ForeignObjList@ which became garbage should have
+been reported (by calling their finalising routines; and the @(Old)ForeignObjList@
+updated to contain only those Foreign objects which are still live.
 \end{itemize}
 
 \end{description}
@@ -436,6 +431,7 @@ same, but without the saved SuA pointer.
 We store the following information concerning the stacks in a global
 structure. (sequential only).
 \begin{code}
+#if 1 /* ndef CONCURRENT * /? HWL */
 
 typedef struct {
     PP_        botA;   /* Points to bottom-most word of A stack */
@@ -443,6 +439,8 @@ typedef struct {
 } stackData;
 
 extern stackData stackInfo;
+
+#endif /* !CONCURRENT */
 \end{code}
 
 %************************************************************************
@@ -470,7 +468,7 @@ in the info-table.
 #define _INFO_MARKING
 
 #else
-/* NO_INFO_SPECIFIED (ToDo: an #error ???) */
+/* NO_INFO_SPECIFIED (ToDo: an #error ?) */
 #endif
 #endif
 #endif