diff options
author | Duncan Coutts <duncan@well-typed.com> | 2011-06-06 10:32:33 +0100 |
---|---|---|
committer | Duncan Coutts <duncan@well-typed.com> | 2011-07-18 16:31:14 +0100 |
commit | 5d091088ce94be4c389fa669911d0e842bd08952 (patch) | |
tree | ec18221bfe74de9bbfbdded76b923f90630aaae6 /rts/Sparks.c | |
parent | ddb47a91da7132da2303c60a5aff4e38fb2dcf1a (diff) | |
download | haskell-5d091088ce94be4c389fa669911d0e842bd08952.tar.gz |
Move allocation of spark pools into initCapability
Rather than a separate phase of initSparkPools. It means all the spark
stuff for a capability is initialisaed at the same time, which is then
becomes a good place to stick an initial spark trace event.
Diffstat (limited to 'rts/Sparks.c')
-rw-r--r-- | rts/Sparks.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/rts/Sparks.c b/rts/Sparks.c index 26b8199035..6ce2e68094 100644 --- a/rts/Sparks.c +++ b/rts/Sparks.c @@ -17,14 +17,10 @@ #if defined(THREADED_RTS) -void -initSparkPools( void ) +SparkPool * +allocSparkPool( void ) { - /* walk over the capabilities, allocating a spark pool for each one */ - nat i; - for (i = 0; i < n_capabilities; i++) { - capabilities[i].sparks = newWSDeque(RtsFlags.ParFlags.maxLocalSparks); - } + return newWSDeque(RtsFlags.ParFlags.maxLocalSparks); } void |