add another SMP assertion
[ghc-hetmet.git] / ghc / rts / Schedule.c
index 3f10e70..b0a8dc6 100644 (file)
@@ -563,6 +563,8 @@ run_thread:
     // ----------------------------------------------------------------------
     // Run the current thread 
 
+    ASSERT_FULL_CAPABILITY_INVARIANTS(cap,task);
+
     prev_what_next = t->what_next;
 
     errno = t->saved_errno;
@@ -616,7 +618,7 @@ run_thread:
     // be running again, see code below.
     t->saved_errno = errno;
 
-#ifdef SMP
+#if defined(THREADED_RTS)
     // If ret is ThreadBlocked, and this Task is bound to the TSO that
     // blocked, we are in limbo - the TSO is now owned by whatever it
     // is blocked on, and may in fact already have been woken up,
@@ -2289,6 +2291,8 @@ resumeThread (void *task_)
     /* We might have GC'd, mark the TSO dirty again */
     dirtyTSO(tso);
 
+    IF_DEBUG(sanity, checkTSO(tso));
+
     return &cap->r;
 }