8 static void a(void *obj)
10 x.store(1, std::memory_order_relaxed);
11 printf("y: %d\n", y.load(std::memory_order_relaxed));
14 static void b(void *obj)
16 y.store(1, std::memory_order_relaxed);
17 printf("x: %d\n", x.load(std::memory_order_relaxed));
20 int user_main(int argc, char **argv)
27 printf("Main thread: creating 2 threads\n");
28 thrd_create(&t1, (thrd_start_t)&a, NULL);
29 thrd_create(&t2, (thrd_start_t)&b, NULL);
33 printf("Main thread is finished\n");