Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
-
a3983a26
by Sylvain Henry at 2025-08-12T10:02:20-04:00
2 changed files:
Changes:
... | ... | @@ -92,15 +92,13 @@ static void *itimer_thread_func(void *_handle_tick) |
92 | 92 | |
93 | 93 | // Relaxed is sufficient: If we don't see that exited was set in one iteration we will
|
94 | 94 | // see it next time.
|
95 | - TSAN_ANNOTATE_BENIGN_RACE(&exited, "itimer_thread_func");
|
|
96 | - while (!RELAXED_LOAD(&exited)) {
|
|
95 | + while (!RELAXED_LOAD_ALWAYS(&exited)) {
|
|
97 | 96 | if (rtsSleep(itimer_interval) != 0) {
|
98 | 97 | sysErrorBelch("Ticker: sleep failed: %s", strerror(errno));
|
99 | 98 | }
|
100 | 99 | |
101 | 100 | // first try a cheap test
|
102 | - TSAN_ANNOTATE_BENIGN_RACE(&stopped, "itimer_thread_func");
|
|
103 | - if (RELAXED_LOAD(&stopped)) {
|
|
101 | + if (RELAXED_LOAD_ALWAYS(&stopped)) {
|
|
104 | 102 | OS_ACQUIRE_LOCK(&mutex);
|
105 | 103 | // should we really stop?
|
106 | 104 | if (stopped) {
|
... | ... | @@ -109,8 +109,7 @@ static void *itimer_thread_func(void *_handle_tick) |
109 | 109 | |
110 | 110 | // Relaxed is sufficient: If we don't see that exited was set in one iteration we will
|
111 | 111 | // see it next time.
|
112 | - TSAN_ANNOTATE_BENIGN_RACE(&exited, "itimer_thread_func");
|
|
113 | - while (!RELAXED_LOAD(&exited)) {
|
|
112 | + while (!RELAXED_LOAD_ALWAYS(&exited)) {
|
|
114 | 113 | if (poll(pollfds, 2, -1) == -1) {
|
115 | 114 | // While the RTS attempts to mask signals, some foreign libraries
|
116 | 115 | // may rely on signal delivery may unmask them. Consequently we may
|
... | ... | @@ -144,8 +143,7 @@ static void *itimer_thread_func(void *_handle_tick) |
144 | 143 | }
|
145 | 144 | |
146 | 145 | // first try a cheap test
|
147 | - TSAN_ANNOTATE_BENIGN_RACE(&stopped, "itimer_thread_func");
|
|
148 | - if (RELAXED_LOAD(&stopped)) {
|
|
146 | + if (RELAXED_LOAD_ALWAYS(&stopped)) {
|
|
149 | 147 | OS_ACQUIRE_LOCK(&mutex);
|
150 | 148 | // should we really stop?
|
151 | 149 | if (stopped) {
|