Split part of the Task struct into a separate struct InCall
[ghc-hetmet.git] / rts / sm / Compact.c
index 315eda7..e55ae2b 100644 (file)
@@ -1014,10 +1014,14 @@ compact(StgClosure *static_objects)
     // the task list
     {
        Task *task;
+        InCall *incall;
        for (task = all_tasks; task != NULL; task = task->all_link) {
-           if (task->tso) {
-               thread_(&task->tso);
-           }
+            for (incall = task->incall; incall != NULL; 
+                 incall = incall->prev_stack) {
+                if (incall->tso) {
+                    thread_(&incall->tso);
+                }
+            }
        }
     }