summaryrefslogtreecommitdiff
path: root/rts/Schedule.c
diff options
context:
space:
mode:
authorSpencer Janssen <spencer@well-typed.com>2011-04-14 01:11:05 -0500
committerSimon Marlow <marlowsd@gmail.com>2011-05-18 11:14:27 +0100
commit58532eb46041aec8d4cbb48b054cb5b001edb43c (patch)
tree1fd878273e11b04045e48178acc8eaacd2ccace9 /rts/Schedule.c
parent58339b06aff704834e8553faaa2db00d746b26f3 (diff)
downloadhaskell-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.c16
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);
}