diff options
author | Simon Marlow <marlowsd@gmail.com> | 2014-10-10 14:26:19 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2014-10-10 14:31:59 +0100 |
commit | 674c631ea111233daa929ef63500d75ba0db8858 (patch) | |
tree | db42f94960c86876b73785f2c1946aeff871308e /rts/Task.c | |
parent | d3f56ec6a6ead847233fee5dfad7979c2d63fc3d (diff) | |
download | haskell-674c631ea111233daa929ef63500d75ba0db8858.tar.gz |
Name worker threads using pthread_setname_np
This helps identify threads in gdb particularly in processes with a
lot of threads.
Diffstat (limited to 'rts/Task.c')
-rw-r--r-- | rts/Task.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/Task.c b/rts/Task.c index 0370711692..42893fe903 100644 --- a/rts/Task.c +++ b/rts/Task.c @@ -462,7 +462,7 @@ startWorkerTask (Capability *cap) ASSERT_LOCK_HELD(&cap->lock); cap->running_task = task; - r = createOSThread(&tid, (OSThreadProc*)workerStart, task); + r = createOSThread(&tid, "ghc_worker", (OSThreadProc*)workerStart, task); if (r != 0) { sysErrorBelch("failed to create OS thread"); stg_exit(EXIT_FAILURE); |