summaryrefslogtreecommitdiff
path: root/rts/posix
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 /rts/posix
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 'rts/posix')
-rw-r--r--rts/posix/Select.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/rts/posix/Select.c b/rts/posix/Select.c
index b342b0c109..07903865a8 100644
--- a/rts/posix/Select.c
+++ b/rts/posix/Select.c
@@ -106,8 +106,8 @@ static bool wakeUpSleepingThreads (LowResTime now)
sleeping_queue = tso->_link;
tso->why_blocked = NotBlocked;
tso->_link = END_TSO_QUEUE;
- IF_DEBUG(scheduler, debugBelch("Waking up sleeping thread %lu\n",
- (unsigned long)tso->id));
+ IF_DEBUG(scheduler, debugBelch("Waking up sleeping thread %"
+ FMT_StgThreadID "\n", tso->id));
// MainCapability: this code is !THREADED_RTS
pushOnRunQueue(&MainCapability,tso);
flag = true;
@@ -420,15 +420,15 @@ awaitEvent(bool wait)
* pass an IOError to blocked threads (#4934)
*/
IF_DEBUG(scheduler,
- debugBelch("Killing blocked thread %lu on bad fd=%i\n",
- (unsigned long)tso->id, fd));
+ debugBelch("Killing blocked thread %" FMT_StgThreadID
+ " on bad fd=%i\n", tso->id, fd));
raiseAsync(&MainCapability, tso,
(StgClosure *)blockedOnBadFD_closure, false, NULL);
break;
case RTS_FD_IS_READY:
IF_DEBUG(scheduler,
- debugBelch("Waking up blocked thread %lu\n",
- (unsigned long)tso->id));
+ debugBelch("Waking up blocked thread %" FMT_StgThreadID "\n",
+ tso->id));
tso->why_blocked = NotBlocked;
tso->_link = END_TSO_QUEUE;
pushOnRunQueue(&MainCapability,tso);