fix occasional failure of numsparks001 test. During shutdown we
authorSimon Marlow <marlowsd@gmail.com>
Sat, 13 Aug 2011 08:40:51 +0000 (09:40 +0100)
committerSimon Marlow <marlowsd@gmail.com>
Sun, 14 Aug 2011 11:17:12 +0000 (12:17 +0100)
commitf6f04307747ca890fc06617bc63feaebd4e9aceb
treedbb0a608c0bf91acf8f06dba457b93e1301fad76
parent1df235e769a278bbd82ae0440501a123ec3596d3
fix occasional failure of numsparks001 test.  During shutdown we
discard all the sparks from each Capability, but we were forgetting to
account for the discarded sparks in the stats, leading to a failure of
the assertion that tests the spark invariant.

I've moved the discarding of sparks to just before the GC, to avoid
race conditions, and counted the discarded sparks as GC'd.
rts/Schedule.c