X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FStgMiscClosures.cmm;h=72c5824be6519b1995dcb8c562895a5993cc1f96;hb=9e10d632f946bae5dd9a9ccd199c8345ca696d15;hp=30088e0b23e7e036b267e3fd03a9857fb2a2ff84;hpb=68f5bad2ae4d3342324d8a09102a9a4f9e49f896;p=ghc-hetmet.git diff --git a/ghc/rts/StgMiscClosures.cmm b/ghc/rts/StgMiscClosures.cmm index 30088e0..72c5824 100644 --- a/ghc/rts/StgMiscClosures.cmm +++ b/ghc/rts/StgMiscClosures.cmm @@ -343,6 +343,7 @@ INFO_TABLE(stg_BLACKHOLE,0,1,BLACKHOLE,"BLACKHOLE","BLACKHOLE") #if defined(SMP) foreign "C" ACQUIRE_LOCK(sched_mutex "ptr"); + // released in stg_block_blackhole_finally #endif /* Put ourselves on the blackhole queue */ @@ -353,12 +354,7 @@ INFO_TABLE(stg_BLACKHOLE,0,1,BLACKHOLE,"BLACKHOLE","BLACKHOLE") StgTSO_why_blocked(CurrentTSO) = BlockedOnBlackHole::I16; StgTSO_block_info(CurrentTSO) = R1; -#if defined(SMP) - foreign "C" RELEASE_LOCK(sched_mutex "ptr"); -#endif - - /* stg_gen_block is too heavyweight, use a specialised one */ - jump stg_block_1; + jump stg_block_blackhole; } #if defined(PAR) || defined(GRAN) @@ -408,6 +404,7 @@ INFO_TABLE(stg_CAF_BLACKHOLE,0,1,CAF_BLACKHOLE,"CAF_BLACKHOLE","CAF_BLACKHOLE") #if defined(SMP) foreign "C" ACQUIRE_LOCK(sched_mutex "ptr"); + // released in stg_block_blackhole_finally #endif /* Put ourselves on the blackhole queue */ @@ -418,12 +415,7 @@ INFO_TABLE(stg_CAF_BLACKHOLE,0,1,CAF_BLACKHOLE,"CAF_BLACKHOLE","CAF_BLACKHOLE") StgTSO_why_blocked(CurrentTSO) = BlockedOnBlackHole::I16; StgTSO_block_info(CurrentTSO) = R1; -#if defined(SMP) - foreign "C" RELEASE_LOCK(sched_mutex "ptr"); -#endif - - /* stg_gen_block is too heavyweight, use a specialised one */ - jump stg_block_1; + jump stg_block_blackhole; } #ifdef EAGER_BLACKHOLING