Simon Jakobi pushed to branch wip/sjakobi/nonmoving-gc-test-fixes at Glasgow Haskell Compiler / GHC
Commits:
-
174ac772
by Simon Jakobi at 2026-08-04T07:46:35+02:00
-
a8b65750
by Simon Jakobi at 2026-08-04T07:46:41+02:00
3 changed files:
Changes:
| ... | ... | @@ -2,5 +2,10 @@ module Main where |
| 2 | 2 | |
| 3 | 3 | import GHC.Conc.Sync
|
| 4 | 4 | |
| 5 | +-- Regression test for the JS backend's ListThreadsOp, which used to omit the
|
|
| 6 | +-- running thread. Whatever other threads the RTS has is irrelevant here.
|
|
| 5 | 7 | main :: IO ()
|
| 6 | -main = listThreads >>= print |
|
| 8 | +main = do
|
|
| 9 | + tid <- myThreadId
|
|
| 10 | + ts <- listThreads
|
|
| 11 | + print (tid `elem` ts) |
| 1 | -[ThreadId 1] |
|
| 1 | +True |
| ... | ... | @@ -110,6 +110,10 @@ function h$rts_getThreadId(t) { // returns a CULLong |
| 110 | 110 | RETURN_UBX_TUP2((t.tid / Math.pow(2,32))>>>0, (t.tid & 0xFFFFFFFF)>>>0);
|
| 111 | 111 | }
|
| 112 | 112 | |
| 113 | +function h$eq_thread(t1,t2) {
|
|
| 114 | + return t1 === t2 ? 1 : 0;
|
|
| 115 | +}
|
|
| 116 | + |
|
| 113 | 117 | function h$cmp_thread(t1,t2) {
|
| 114 | 118 | if(t1.tid < t2.tid) return -1;
|
| 115 | 119 | if(t1.tid > t2.tid) return 1;
|