diff options
author | Roland Zumkeller <Roland.Zumkeller@gmail.com> | 2019-06-22 19:08:43 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-11-19 20:39:19 -0500 |
commit | e57b7cc6d8b1222e0939d19c265b51d2c3c2b4c0 (patch) | |
tree | bd5d91487d198dc19a521c6866fd654232b723c9 | |
parent | 098d50176a2521d08efe6fdbab0ede2b7419786a (diff) | |
download | haskell-e57b7cc6d8b1222e0939d19c265b51d2c3c2b4c0.tar.gz |
Changing Thread IDs from 32 bits to 64 bits.
-rw-r--r-- | includes/rts/Threads.h | 2 | ||||
-rw-r--r-- | includes/rts/storage/TSO.h | 4 | ||||
-rw-r--r-- | rts/Threads.c | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/includes/rts/Threads.h b/includes/rts/Threads.h index 4bb480cf2b..7f016decb6 100644 --- a/includes/rts/Threads.h +++ b/includes/rts/Threads.h @@ -42,7 +42,7 @@ StgRegTable * resumeThread (void *); // Thread operations from Threads.c // int cmp_thread (StgPtr tso1, StgPtr tso2); -int rts_getThreadId (StgPtr tso); +long rts_getThreadId (StgPtr tso); void rts_enableThreadAllocationLimit (StgPtr tso); void rts_disableThreadAllocationLimit (StgPtr tso); diff --git a/includes/rts/storage/TSO.h b/includes/rts/storage/TSO.h index d706282796..3a488d97b5 100644 --- a/includes/rts/storage/TSO.h +++ b/includes/rts/storage/TSO.h @@ -20,9 +20,9 @@ typedef struct { */ /* - * Thread IDs are 32 bits. + * Thread IDs are 64 bits. */ -typedef StgWord32 StgThreadID; +typedef StgWord64 StgThreadID; #define tsoLocked(tso) ((tso)->flags & TSO_LOCKED) diff --git a/rts/Threads.c b/rts/Threads.c index 8b05dd7c50..cce32ca2b3 100644 --- a/rts/Threads.c +++ b/rts/Threads.c @@ -161,7 +161,7 @@ cmp_thread(StgPtr tso1, StgPtr tso2) * * This is used in the implementation of Show for ThreadIds. * ------------------------------------------------------------------------ */ -int +long rts_getThreadId(StgPtr tso) { return ((StgTSO *)tso)->id; @@ -882,8 +882,8 @@ printThreadBlockage(StgTSO *tso) debugBelch("is blocked on an STM operation"); break; default: - barf("printThreadBlockage: strange tso->why_blocked: %d for TSO %d (%p)", - tso->why_blocked, tso->id, tso); + barf("printThreadBlockage: strange tso->why_blocked: %d for TSO %ld (%p)", + tso->why_blocked, (long)tso->id, tso); } } |