
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: a3983a26 by Sylvain Henry at 2025-08-12T10:02:20-04:00 RTS: remove some TSAN annotations (#20464) Use RELAXED_LOAD_ALWAYS macro instead. - - - - - 2 changed files: - rts/posix/ticker/Pthread.c - rts/posix/ticker/TimerFd.c Changes: ===================================== rts/posix/ticker/Pthread.c ===================================== @@ -92,15 +92,13 @@ static void *itimer_thread_func(void *_handle_tick) // Relaxed is sufficient: If we don't see that exited was set in one iteration we will // see it next time. - TSAN_ANNOTATE_BENIGN_RACE(&exited, "itimer_thread_func"); - while (!RELAXED_LOAD(&exited)) { + while (!RELAXED_LOAD_ALWAYS(&exited)) { if (rtsSleep(itimer_interval) != 0) { sysErrorBelch("Ticker: sleep failed: %s", strerror(errno)); } // first try a cheap test - TSAN_ANNOTATE_BENIGN_RACE(&stopped, "itimer_thread_func"); - if (RELAXED_LOAD(&stopped)) { + if (RELAXED_LOAD_ALWAYS(&stopped)) { OS_ACQUIRE_LOCK(&mutex); // should we really stop? if (stopped) { ===================================== rts/posix/ticker/TimerFd.c ===================================== @@ -109,8 +109,7 @@ static void *itimer_thread_func(void *_handle_tick) // Relaxed is sufficient: If we don't see that exited was set in one iteration we will // see it next time. - TSAN_ANNOTATE_BENIGN_RACE(&exited, "itimer_thread_func"); - while (!RELAXED_LOAD(&exited)) { + while (!RELAXED_LOAD_ALWAYS(&exited)) { if (poll(pollfds, 2, -1) == -1) { // While the RTS attempts to mask signals, some foreign libraries // may rely on signal delivery may unmask them. Consequently we may @@ -144,8 +143,7 @@ static void *itimer_thread_func(void *_handle_tick) } // first try a cheap test - TSAN_ANNOTATE_BENIGN_RACE(&stopped, "itimer_thread_func"); - if (RELAXED_LOAD(&stopped)) { + if (RELAXED_LOAD_ALWAYS(&stopped)) { OS_ACQUIRE_LOCK(&mutex); // should we really stop? if (stopped) { View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a3983a264c7509ed25cae0ade60c13b3... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a3983a264c7509ed25cae0ade60c13b3... You're receiving this email because of your account on gitlab.haskell.org.