summaryrefslogtreecommitdiff
path: root/rts/Sparks.c
diff options
context:
space:
mode:
authordonnie@darthik.com <unknown>2009-04-13 01:14:44 +0000
committerdonnie@darthik.com <unknown>2009-04-13 01:14:44 +0000
commit6f045438008234fe58c7629ce1b33e3524fc9006 (patch)
tree2b99561222ef103bbda1ac70ab1275495c69da9d /rts/Sparks.c
parentc29305dadcb245bb080f65d946d92d0035243b6c (diff)
downloadhaskell-6f045438008234fe58c7629ce1b33e3524fc9006.tar.gz
Added new EventLog event: Spark to Thread.
Diffstat (limited to 'rts/Sparks.c')
-rw-r--r--rts/Sparks.c7
1 files changed, 7 insertions, 0 deletions
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);
}