summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorRoland Zumkeller <Roland.Zumkeller@gmail.com>2019-06-22 19:35:07 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-11-19 20:39:19 -0500
commitd1f3c63701b7f0fd675f792af7f33c5b11eaff83 (patch)
tree077460cd5f8cf6525908c08cc4a6f4e3ade441a6 /includes
parente57b7cc6d8b1222e0939d19c265b51d2c3c2b4c0 (diff)
downloadhaskell-d1f3c63701b7f0fd675f792af7f33c5b11eaff83.tar.gz
Use pointer equality in Eq/Ord for ThreadId
Changes (==) to use only pointer equality. This is safe because two threads are the same iff they have the same id. Changes `compare` to check pointer equality first and fall back on ids only in case of inequality. See discussion in #16761.
Diffstat (limited to 'includes')
-rw-r--r--includes/rts/Threads.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/includes/rts/Threads.h b/includes/rts/Threads.h
index 7f016decb6..6d4aa76761 100644
--- a/includes/rts/Threads.h
+++ b/includes/rts/Threads.h
@@ -41,6 +41,7 @@ StgRegTable * resumeThread (void *);
//
// Thread operations from Threads.c
//
+bool eq_thread (StgPtr tso1, StgPtr tso2);
int cmp_thread (StgPtr tso1, StgPtr tso2);
long rts_getThreadId (StgPtr tso);
void rts_enableThreadAllocationLimit (StgPtr tso);