diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2017-10-16 15:28:02 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-10-16 17:24:49 -0400 |
commit | 7e790b38c205da67681f632b00faf7a0ea33510d (patch) | |
tree | c23e0efca6d007dc2120d951a291e45bf08c7fa8 /rts/win32 | |
parent | 5dab54428229a8d4f1658c4ad94f616b211851fe (diff) | |
download | haskell-7e790b38c205da67681f632b00faf7a0ea33510d.tar.gz |
rts: Label all threads created by the RTS
Reviewers: austin, erikd, simonmar
Reviewed By: simonmar
Subscribers: pacak, rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D4068
Diffstat (limited to 'rts/win32')
-rw-r--r-- | rts/win32/ConsoleHandler.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/rts/win32/ConsoleHandler.c b/rts/win32/ConsoleHandler.c index 3d283b0162..88c4a61912 100644 --- a/rts/win32/ConsoleHandler.c +++ b/rts/win32/ConsoleHandler.c @@ -183,13 +183,15 @@ void startSignalHandlers(Capability *cap) handler = deRefStablePtr((StgStablePtr)console_handler); while (stg_pending_events > 0) { stg_pending_events--; - scheduleThread(cap, + StgTSO *t = createIOThread(cap, - RtsFlags.GcFlags.initialStkSize, - rts_apply(cap, - (StgClosure *)handler, - rts_mkInt(cap, - stg_pending_buf[stg_pending_events])))); + RtsFlags.GcFlags.initialStkSize, + rts_apply(cap, + (StgClosure *)handler, + rts_mkInt(cap, + stg_pending_buf[stg_pending_events]))); + scheduleThread(cap, t); + labelThread(cap, t, "signal handler thread"); } RELEASE_LOCK(&sched_mutex); |