]> git.feebdaed.xyz Git - 0xmirror/civetweb.git/commitdiff
Modify STOP_FLAG_ASSING to make TSAN happy (#1333)
authorbel2125 <bel2125@gmail.com>
Fri, 18 Apr 2025 08:54:32 +0000 (10:54 +0200)
committerbel2125 <bel2125@gmail.com>
Fri, 18 Apr 2025 08:54:32 +0000 (10:54 +0200)
CREDITS.md
src/civetweb.c

index f1e1d1508a3394a8def8485b09e39bfd79645164..f6a2a79dcb83644c0d78c3f6dae1b306d1efe6df 100644 (file)
 * Lammert Bies
 * Lars Immisch
 * Lawrence
+* Lev275568
 * Li Peng
 * Lianghui
 * Lorenzo Canepa
index 9e098045a66ff8163d99315fea6935e45f8aec63..e09bcf3a91d82497df4a2f6dc3cd14043154f69d 100644 (file)
@@ -2339,7 +2339,9 @@ STOP_FLAG_ASSIGN(stop_flag_t *f, stop_flag_t v)
 {
        stop_flag_t sf = 0;
        do {
-               sf = mg_atomic_compare_and_swap(f, *f, v);
+               sf = mg_atomic_compare_and_swap(f,
+                                               __atomic_load_n(f, __ATOMIC_SEQ_CST),
+                                               v);
        } while (sf != v);
 }