[project @ 1996-07-19 18:36:04 by partain]
[ghc-hetmet.git] / ghc / runtime / main / StgUpdate.lhc
index e0cb245..5a229ec 100644 (file)
@@ -7,10 +7,6 @@
 This code is required by the update interface which sits on top of the
 storage manager interface (See \tr{SMupdate.lh}).
 
-Some of this stuff has been separated (correctly!) into StgThreads.lhc
-for version 0.23.  Could someone (Hans?) bring us up to date, please!
-KH.
-
 \begin{itemize}
 \item Indirection entry code and info table.
 \item Black Hole entry code and info table.
@@ -31,7 +27,7 @@ System-wide constants need to be included:
 #endif
 #endif
 
-EXTDATA(Nil_closure);
+EXTDATA(Prelude_Z91Z93_closure);
 
 #if defined(TICKY_TICKY)
 void PrintTickyInfo(STG_NO_ARGS);
@@ -130,15 +126,16 @@ STGFUN(BH_UPD_entry)
     FB_
 
 # if 0
-    if ( debug & 0x80 ) 
+    if ( RTSflags.GranFlags.debug & 0x80 ) 
       (void) STGCALL4(int,(),fprintf,stderr,"GRAN_CHECK in BH_UPD_entry: Entered a `black hole' @ 0x%x (CurrentTSO @ 0x%x\n ",Node,CurrentTSO);
-#endif
+# endif
 
 # if defined(GRAN)
-    STGCALL0(void,(),GranSimBlock);    /* Do this before losing its TSO_LINK */
+    /* Do this before losing its TSO_LINK */
+    STGCALL3(void,(),GranSimBlock,CurrentTSO,CurrentProc,Node);        
 # endif
 
-    TSO_LINK(CurrentTSO) = Nil_closure;
+    TSO_LINK(CurrentTSO) = Prelude_Z91Z93_closure;
     SET_INFO_PTR(Node, BQ_info);
     BQ_ENTRIES(Node) = (W_) CurrentTSO;
 
@@ -173,8 +170,8 @@ STGFUN(BH_UPD_entry)
 # endif
 
 # if defined(GRAN)
-    /* CurrentTSO = Nil_closure; */
-    ReSchedule(NEW_THREAD);
+    /* CurrentTSO = Prelude_Z91Z93_closure; */
+    ReSchedule(SAME_THREAD);
 # else
     ReSchedule(0);
 # endif
@@ -405,9 +402,6 @@ STGFUN(Perm_Ind_entry)
 
     InfoPtr=(D_)(INFO_PTR(Node));
 
-# if defined(GRAN)
-    GRAN_EXEC(1,1,2,0,0);
-# endif
     JMP_(ENTRY_CODE(InfoPtr));
     FE_
 }
@@ -469,7 +463,7 @@ STGFUN(UpdatePAP)
 
     FB_
 
-#if defined(COUNT)
+#if defined(GRAN_COUNT)
       ++nPAPs;
 #endif
 
@@ -602,7 +596,7 @@ STGFUN(UpdatePAP)
      * Don't count this entry for ticky-ticky profiling. 
     */
 
-#if defined(GRAN)
+#if 0 /* defined(GRAN) */
     GRAN_EXEC(16,4,7,4,0);
 #endif
     InfoPtr=(D_)(INFO_PTR(Node));