Update ChangeLog and version files for release
[official-gcc.git] / gcc / testsuite / c-c++-common / tsan / step.c
blobce9edd454a031208ee5fa05fdbc64b231f49270a
1 /* { dg-do compile } */
3 extern int sched_yield (void);
4 static volatile int serial = 0;
6 __attribute__((no_sanitize_thread))
7 void step (int i)
9 while (__atomic_load_n (&serial, __ATOMIC_ACQUIRE) != i - 1)
10 sched_yield ();
11 __atomic_store_n (&serial, i, __ATOMIC_RELEASE);
14 /* { dg-final { scan-assembler-not "__tsan_func_entry" } } */
15 /* { dg-final { scan-assembler-not "__tsan_func_exit" } } */