From 6f045438008234fe58c7629ce1b33e3524fc9006 Mon Sep 17 00:00:00 2001 From: "donnie@darthik.com" Date: Mon, 13 Apr 2009 01:14:44 +0000 Subject: Added new EventLog event: Spark to Thread. --- rts/Sparks.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'rts/Sparks.c') diff --git a/rts/Sparks.c b/rts/Sparks.c index aed75e52ab..75464d925b 100644 --- a/rts/Sparks.c +++ b/rts/Sparks.c @@ -58,6 +58,13 @@ createSparkThread (Capability *cap) tso = createIOThread (cap, RtsFlags.GcFlags.initialStkSize, &base_GHCziConc_runSparks_closure); + if (cap->r.rCurrentTSO != NULL) + // Capability in a bound thread? + postEvent(cap, EVENT_SPARK_TO_THREAD, cap->r.rCurrentTSO->id, tso->id); + else + // Capability in a worker thread? + postEvent(cap, EVENT_SPARK_TO_THREAD, 0, tso->id); + appendToRunQueue(cap,tso); } -- cgit v1.2.1