summaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorMann mit Hut <haskell+gitlab@with-h.at>2021-07-09 17:46:51 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-10-06 00:11:07 -0400
commit435ff39871776f73c946353689ea4f0305cc4501 (patch)
treeebf8df21578affdcce1d8f8cc629e2b049982ff0 /libraries
parent29ee04f330514651537b0e851a948373a38fa231 (diff)
downloadhaskell-435ff39871776f73c946353689ea4f0305cc4501.tar.gz
Corrected types of thread ids obtained from the RTS
While the thread ids had been changed to 64 bit words in e57b7cc6d8b1222e0939d19c265b51d2c3c2b4c0 the return type of the foreign import function used to retrieve these ids - namely 'GHC.Conc.Sync.getThreadId' - was never updated accordingly. In order to fix that this function returns now a 'CUULong'. In addition to that the types used in the thread labeling subsystem were adjusted as well and several format strings were modified throughout the whole RTS to display thread ids in a consistent and correct way. Fixes #16761
Diffstat (limited to 'libraries')
-rw-r--r--libraries/base/GHC/Conc/Sync.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/libraries/base/GHC/Conc/Sync.hs b/libraries/base/GHC/Conc/Sync.hs
index 8bab43b966..b05fe06f4f 100644
--- a/libraries/base/GHC/Conc/Sync.hs
+++ b/libraries/base/GHC/Conc/Sync.hs
@@ -152,7 +152,7 @@ instance Show ThreadId where
showThreadId :: ThreadId -> String
showThreadId = show
-foreign import ccall unsafe "rts_getThreadId" getThreadId :: ThreadId# -> CInt
+foreign import ccall unsafe "rts_getThreadId" getThreadId :: ThreadId# -> CULLong
id2TSO :: ThreadId -> ThreadId#
id2TSO (ThreadId t) = t