X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=rts%2FHeapStackCheck.cmm;h=333d0c09e072dcc83cd77ff9fd9e5f16ce445992;hp=5579e9238af86edcb96d077266817539113bfd95;hb=b7fecf522f271305de84d0efe8af5cad28aa45f5;hpb=e7c08550be472eb94a383d4c6115c83e103fcd28 diff --git a/rts/HeapStackCheck.cmm b/rts/HeapStackCheck.cmm index 5579e92..333d0c0 100644 --- a/rts/HeapStackCheck.cmm +++ b/rts/HeapStackCheck.cmm @@ -12,6 +12,12 @@ #include "Cmm.h" +#ifdef __PIC__ +import pthread_mutex_unlock; +#endif +import EnterCriticalSection; +import LeaveCriticalSection; + /* Stack/Heap Check Failure * ------------------------ * @@ -821,7 +827,9 @@ INFO_TABLE_RET( stg_block_takemvar, RET_SMALL, "ptr" W_ unused ) stg_block_takemvar_finally { #ifdef THREADED_RTS - unlockClosure(R3, stg_EMPTY_MVAR_info); + unlockClosure(R3, stg_MVAR_DIRTY_info); +#else + SET_INFO(R3, stg_MVAR_DIRTY_info); #endif jump StgReturn; } @@ -847,7 +855,9 @@ INFO_TABLE_RET( stg_block_putmvar, RET_SMALL, "ptr" W_ unused1, "ptr" W_ unused2 stg_block_putmvar_finally { #ifdef THREADED_RTS - unlockClosure(R3, stg_FULL_MVAR_info); + unlockClosure(R3, stg_MVAR_DIRTY_info); +#else + SET_INFO(R3, stg_MVAR_DIRTY_info); #endif jump StgReturn; } @@ -869,7 +879,7 @@ stg_block_blackhole_finally // The last thing we do is release sched_lock, which is // preventing other threads from accessing blackhole_queue and // picking up this thread before we are finished with it. - foreign "C" RELEASE_LOCK(sched_mutex "ptr"); + RELEASE_LOCK(sched_mutex "ptr"); #endif jump StgReturn; }