X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FSchedule.c;h=97923022b44b44f727bc59a62b118f989d5332ac;hb=de75026f5a48d3d052135a973ab4dff76c5b20f5;hp=141c973f3aa09693f4e94c4a6f3253163469727d;hpb=0506cb7ec75321eaacc6c279d01d82368d2ca125;p=ghc-hetmet.git diff --git a/rts/Schedule.c b/rts/Schedule.c index 141c973..9792302 100644 --- a/rts/Schedule.c +++ b/rts/Schedule.c @@ -285,7 +285,9 @@ schedule (Capability *initialCapability, Task *task) if (running_finalizers) { errorBelch("error: a C finalizer called back into Haskell.\n" - " use Foreign.Concurrent.newForeignPtr for Haskell finalizers."); + " This was previously allowed, but is disallowed in GHC 6.10.2 and later.\n" + " To create finalizers that may call back into Haskll, use\n" + " Foreign.Concurrent.newForeignPtr instead of Foreign.newForeignPtr."); stg_exit(EXIT_FAILURE); } @@ -858,7 +860,7 @@ schedulePushWork(Capability *cap USED_IF_THREADS, debugTrace(DEBUG_sched, "pushing thread %lu to capability %d", (unsigned long)t->id, free_caps[i]->no); appendToRunQueue(free_caps[i],t); - postEvent (cap, EVENT_MIGRATE_THREAD, t->id, free_caps[i]->no); + postEvent (cap, EVENT_MIGRATE_THREAD, t->id, free_caps[i]->no); if (t->bound) { t->bound->cap = free_caps[i]; } t->cap = free_caps[i]; @@ -881,6 +883,9 @@ schedulePushWork(Capability *cap USED_IF_THREADS, spark = tryStealSpark(cap->sparks); if (spark != NULL) { debugTrace(DEBUG_sched, "pushing spark %p to capability %d", spark, free_caps[i]->no); + + postEvent(free_caps[i], EVENT_STEAL_SPARK, t->id, cap->no); + newSpark(&(free_caps[i]->r), spark); } }