further fix for floating point primitives
[ghc-hetmet.git] / ghc / rts / Schedule.h
index 9335e59..553c2a2 100644 (file)
@@ -55,6 +55,14 @@ StgTSO * unblockOne(Capability *cap, StgTSO *tso);
  */
 void raiseAsync(Capability *cap, StgTSO *tso, StgClosure *exception);
 
+/* suspendComputation()
+ *
+ * A variant of raiseAsync(), this strips the stack of the specified
+ * thread down to the stop_here point, leaving a current closure on
+ * top of the stack at [stop_here - 1].
+ */
+void suspendComputation(Capability *cap, StgTSO *tso, StgPtr stop_here);
+
 /* raiseExceptionHelper */
 StgWord raiseExceptionHelper (StgRegTable *reg, StgTSO *tso, StgClosure *exception);
 
@@ -78,7 +86,6 @@ void GetRoots(evac_fn);
  */
 void workerStart(Task *task);
 
-// ToDo: check whether all fcts below are used in the SMP version, too
 #if defined(GRAN)
 void    awaken_blocked_queue(StgBlockingQueueElement *q, StgClosure *node);
 void    unlink_from_bq(StgTSO* tso, StgClosure* node);
@@ -280,6 +287,12 @@ emptyThreadQueues(Capability *cap)
     ;
 }
 
+STATIC_INLINE void
+dirtyTSO (StgTSO *tso)
+{
+    tso->flags |= TSO_DIRTY;
+}
+
 #ifdef DEBUG
 void sched_belch(char *s, ...)
    GNU_ATTRIBUTE(format (printf, 1, 2));