summaryrefslogtreecommitdiff
path: root/rts/Schedule.c
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/Schedule.c
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/Schedule.c')
-rw-r--r--rts/Schedule.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/rts/Schedule.c b/rts/Schedule.c
index 3306f00ff3..4fe18fa769 100644
--- a/rts/Schedule.c
+++ b/rts/Schedule.c
@@ -1358,7 +1358,7 @@ scheduleHandleThreadFinished (Capability *cap, Task *task, StgTSO *t)
}
}
- removeThreadLabel((StgWord)task->incall->tso->id);
+ removeThreadLabel(task->incall->tso->id);
// We no longer consider this thread and task to be bound to
// each other. The TSO lives on until it is GC'd, but the
@@ -2646,7 +2646,7 @@ scheduleWaitThread (StgTSO* tso, /*[out]*/HaskellObj* ret, Capability **pcap)
appendToRunQueue(cap,tso);
DEBUG_ONLY( id = tso->id );
- debugTrace(DEBUG_sched, "new bound thread (%lu)", (unsigned long)id);
+ debugTrace(DEBUG_sched, "new bound thread (%" FMT_StgThreadID ")", id);
// As the TSO is bound and on the run queue, schedule() will run the TSO.
cap = schedule(cap,task);
@@ -2654,7 +2654,7 @@ scheduleWaitThread (StgTSO* tso, /*[out]*/HaskellObj* ret, Capability **pcap)
ASSERT(task->incall->rstat != NoStatus);
ASSERT_FULL_CAPABILITY_INVARIANTS(cap,task);
- debugTrace(DEBUG_sched, "bound thread (%lu) finished", (unsigned long)id);
+ debugTrace(DEBUG_sched, "bound thread (%" FMT_StgThreadID ") finished", id);
*pcap = cap;
}
@@ -3198,7 +3198,7 @@ resurrectThreads (StgTSO *threads)
tso->global_link = gen->threads;
gen->threads = tso;
- debugTrace(DEBUG_sched, "resurrecting thread %lu", (unsigned long)tso->id);
+ debugTrace(DEBUG_sched, "resurrecting thread %" FMT_StgThreadID, tso->id);
// Wake up the thread on the Capability it was last on
cap = tso->cap;