diff options
author | Mann mit Hut <haskell+gitlab@with-h.at> | 2021-07-09 17:46:51 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-10-06 00:11:07 -0400 |
commit | 435ff39871776f73c946353689ea4f0305cc4501 (patch) | |
tree | ebf8df21578affdcce1d8f8cc629e2b049982ff0 /rts/Messages.c | |
parent | 29ee04f330514651537b0e851a948373a38fa231 (diff) | |
download | haskell-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/Messages.c')
-rw-r--r-- | rts/Messages.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/rts/Messages.c b/rts/Messages.c index 2ec12da3ad..d4a51f4ea6 100644 --- a/rts/Messages.c +++ b/rts/Messages.c @@ -74,8 +74,8 @@ loop: if (i == &stg_MSG_TRY_WAKEUP_info) { StgTSO *tso = ((MessageWakeup *)m)->tso; - debugTraceCap(DEBUG_sched, cap, "message: try wakeup thread %ld", - (W_)tso->id); + debugTraceCap(DEBUG_sched, cap, "message: try wakeup thread %" + FMT_StgThreadID, tso->id); tryWakeupThread(cap, tso); } else if (i == &stg_MSG_THROWTO_info) @@ -171,8 +171,8 @@ uint32_t messageBlackHole(Capability *cap, MessageBlackHole *msg) StgClosure *bh = UNTAG_CLOSURE(msg->bh); StgTSO *owner; - debugTraceCap(DEBUG_sched, cap, "message: thread %d blocking on " - "blackhole %p", (W_)msg->tso->id, msg->bh); + debugTraceCap(DEBUG_sched, cap, "message: thread %" FMT_StgThreadID + " blocking on blackhole %p", msg->tso->id, msg->bh); info = ACQUIRE_LOAD(&bh->header.info); @@ -268,8 +268,8 @@ loop: } recordClosureMutated(cap,bh); // bh was mutated - debugTraceCap(DEBUG_sched, cap, "thread %d blocked on thread %d", - (W_)msg->tso->id, (W_)owner->id); + debugTraceCap(DEBUG_sched, cap, "thread %" FMT_StgThreadID " blocked on" + " thread %" FMT_StgThreadID, msg->tso->id, owner->id); return 1; // blocked } @@ -312,9 +312,9 @@ loop: } debugTraceCap(DEBUG_sched, cap, - "thread %d blocked on existing BLOCKING_QUEUE " - "owned by thread %d", - (W_)msg->tso->id, (W_)owner->id); + "thread %" FMT_StgThreadID " blocked on existing " + "BLOCKING_QUEUE owned by thread %" FMT_StgThreadID, + msg->tso->id, owner->id); // See above, #3838 if (owner->why_blocked == NotBlocked && owner->id != msg->tso->id) { |