TICK_ENT_BH();
+#ifdef SMP
+ // foreign "C" debugBelch("BLACKHOLE entry\n");
+#endif
+
/* Actually this is not necessary because R1 is about to be destroyed. */
LDV_ENTER(R1);
+#if defined(SMP)
+ foreign "C" ACQUIRE_LOCK(sched_mutex "ptr");
+ // released in stg_block_blackhole_finally
+#endif
+
/* Put ourselves on the blackhole queue */
StgTSO_link(CurrentTSO) = W_[blackhole_queue];
W_[blackhole_queue] = CurrentTSO;
StgTSO_why_blocked(CurrentTSO) = BlockedOnBlackHole::I16;
StgTSO_block_info(CurrentTSO) = R1;
- /* stg_gen_block is too heavyweight, use a specialised one */
- jump stg_block_1;
+ jump stg_block_blackhole;
}
#if defined(PAR) || defined(GRAN)
TICK_ENT_BH();
LDV_ENTER(R1);
+#if defined(SMP)
+ // foreign "C" debugBelch("BLACKHOLE entry\n");
+#endif
+
+#if defined(SMP)
+ foreign "C" ACQUIRE_LOCK(sched_mutex "ptr");
+ // released in stg_block_blackhole_finally
+#endif
+
/* Put ourselves on the blackhole queue */
StgTSO_link(CurrentTSO) = W_[blackhole_queue];
W_[blackhole_queue] = CurrentTSO;
StgTSO_why_blocked(CurrentTSO) = BlockedOnBlackHole::I16;
StgTSO_block_info(CurrentTSO) = R1;
- /* stg_gen_block is too heavyweight, use a specialised one */
- jump stg_block_1;
+ jump stg_block_blackhole;
}
#ifdef EAGER_BLACKHOLING
#endif
/* ----------------------------------------------------------------------------
+ ------------------------------------------------------------------------- */
+
+INFO_TABLE(stg_WHITEHOLE, 0,0, INVALID_OBJECT, "WHITEHOLE", "WHITEHOLE")
+{ foreign "C" barf("WHITEHOLE object entered!"); }
+
+/* ----------------------------------------------------------------------------
Some static info tables for things that don't get entered, and
therefore don't need entry code (i.e. boxed but unpointed objects)
NON_ENTERABLE_ENTRY_CODE now defined at the beginning of the file
CLOSURE(stg_NO_FINALIZER_closure,stg_NO_FINALIZER);
/* ----------------------------------------------------------------------------
- Foreign Objects are unlifted and therefore never entered.
- ------------------------------------------------------------------------- */
-
-INFO_TABLE(stg_FOREIGN,0,1,FOREIGN,"FOREIGN","FOREIGN")
-{ foreign "C" barf("FOREIGN object entered!"); }
-
-/* ----------------------------------------------------------------------------
Stable Names are unlifted too.
------------------------------------------------------------------------- */