diff options
author | Spencer Janssen <spencer@well-typed.com> | 2011-04-14 01:11:05 -0500 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2011-05-18 11:14:27 +0100 |
commit | 58532eb46041aec8d4cbb48b054cb5b001edb43c (patch) | |
tree | 1fd878273e11b04045e48178acc8eaacd2ccace9 /rts/Schedule.c | |
parent | 58339b06aff704834e8553faaa2db00d746b26f3 (diff) | |
download | haskell-58532eb46041aec8d4cbb48b054cb5b001edb43c.tar.gz |
Add capability sets to the event system. Contains code from Duncan Coutts.
Diffstat (limited to 'rts/Schedule.c')
-rw-r--r-- | rts/Schedule.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/rts/Schedule.c b/rts/Schedule.c index 9636223836..9b151d7283 100644 --- a/rts/Schedule.c +++ b/rts/Schedule.c @@ -2030,16 +2030,16 @@ exitScheduler (rtsBool wait_foreign USED_IF_THREADS) } sched_state = SCHED_SHUTTING_DOWN; + nat i; + + for (i = 0; i < n_capabilities; i++) { #if defined(THREADED_RTS) - { - nat i; - - for (i = 0; i < n_capabilities; i++) { - ASSERT(task->incall->tso == NULL); - shutdownCapability(&capabilities[i], task, wait_foreign); - } - } + ASSERT(task->incall->tso == NULL); + shutdownCapability(&capabilities[i], task, wait_foreign); #endif + traceCapsetRemoveCap(CAPSET_OSPROCESS_DEFAULT, i); + } + traceCapsetDelete(CAPSET_OSPROCESS_DEFAULT); boundTaskExiting(task); } |