during shutdown, only free the heap if we waited for foreign calls to exit
[ghc-hetmet.git] / rts / Task.h
index 2e0a4b8..f91872f 100644 (file)
@@ -4,6 +4,9 @@
  *
  * Tasks
  *
+ * For details on the high-level design, see
+ *   http://hackage.haskell.org/trac/ghc/wiki/Commentary/Rts/Scheduler
+ *
  * -------------------------------------------------------------------------*/
 
 #ifndef TASK_H
@@ -11,7 +14,7 @@
 
 #include "GetTime.h"
 
-BEGIN_RTS_PRIVATE
+#include "BeginPrivate.h"
 
 /* 
    Definition of a Task
@@ -83,6 +86,9 @@ typedef struct InCall_ {
                                 // without owning a Capability in the
                                 // first place.
 
+    SchedulerStatus  stat;      // return status
+    StgClosure **    ret;       // return value
+
     struct Task_ *task;
 
     // When a Haskell thread makes a foreign call that re-enters
@@ -137,9 +143,6 @@ typedef struct Task_ {
     // So that we can detect when a finalizer illegally calls back into Haskell
     rtsBool running_finalizers;
 
-    SchedulerStatus  stat;      // return status
-    StgClosure **    ret;       // return value
-
     // Stats that we collect about this task
     // ToDo: we probably want to put this in a separate TaskStats
     // structure, so we can share it between multiple Tasks.  We don't
@@ -267,6 +270,6 @@ setMyTask (Task *task)
 #endif
 }
 
-END_RTS_PRIVATE
+#include "EndPrivate.h"
 
 #endif /* TASK_H */