diff options
author | Nicolas Trangez <ikke@nicolast.be> | 2022-10-26 18:24:04 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-11-01 12:47:58 -0400 |
commit | edd175c9f9f2988e2836fc3bdc70d627f0f0c5cf (patch) | |
tree | d3585a256a82773832df2970f7e5a53dd43ed092 /rts/include | |
parent | 13b5f102b3049e177220bd6d867a33d5c8864b12 (diff) | |
download | haskell-edd175c9f9f2988e2836fc3bdc70d627f0f0c5cf.tar.gz |
rts: fix OS thread naming in ticker
Since ee0deb805, the use of `pthread_setname_np` on Darwin was fixed
when invoking `createOSThread`. However, the 'ticker' has some
thread-creation code which doesn't rely on `createOSThread`, yet also
uses `pthread_setname_np`.
This patch enforces all thread creation to go through a single
function, which uses the (correct) thread-naming code introduced in
ee0deb805.
See: https://gitlab.haskell.org/ghc/ghc/-/commit/ee0deb8054da2a597fc5624469b4c44fd769ada2
See: https://gitlab.haskell.org/ghc/ghc/-/issues/22206
See: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/9066
Diffstat (limited to 'rts/include')
-rw-r--r-- | rts/include/rts/OSThreads.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rts/include/rts/OSThreads.h b/rts/include/rts/OSThreads.h index 563e886469..ebe964be9a 100644 --- a/rts/include/rts/OSThreads.h +++ b/rts/include/rts/OSThreads.h @@ -175,6 +175,10 @@ typedef void* OSThreadProcAttr OSThreadProc(void *); extern int createOSThread ( OSThreadId* tid, const char *name, OSThreadProc *startProc, void *param); +#if !defined(mingw32_HOST_OS) +extern int createAttachedOSThread( OSThreadId *tid, const char *name, + OSThreadProc *startProc, void *param); +#endif extern bool osThreadIsAlive ( OSThreadId id ); extern void interruptOSThread ( OSThreadId id ); extern void joinOSThread ( OSThreadId id ); |