12 static void a(void *obj)
14 atomic_store_explicit(&x1, 1,memory_order_relaxed);
17 static void b(void *obj)
19 atomic_load_explicit(&x1, memory_order_relaxed);
20 atomic_store_explicit(&x2, 1,memory_order_relaxed);
23 static void c(void *obj)
25 atomic_load_explicit(&x2, memory_order_relaxed);
26 atomic_store_explicit(&x3, 1,memory_order_relaxed);
29 static void d(void *obj)
31 atomic_load_explicit(&x3, memory_order_relaxed);
32 atomic_store_explicit(&x4, 1,memory_order_relaxed);
35 static void e(void *obj)
37 atomic_load_explicit(&x4, memory_order_relaxed);
38 atomic_store_explicit(&x5, 1,memory_order_relaxed);
41 static void f(void *obj)
43 atomic_load_explicit(&x5, memory_order_relaxed);
44 atomic_store_explicit(&x6, 1,memory_order_relaxed);
47 static void g(void *obj)
49 atomic_load_explicit(&x6, memory_order_relaxed);
50 atomic_store_explicit(&x7, 1,memory_order_relaxed);
52 static void h(void *obj)
54 atomic_load_explicit(&x7, memory_order_relaxed);
55 atomic_load_explicit(&x1, memory_order_relaxed);
58 int user_main(int argc, char **argv)
60 thrd_t t1, t2, t3, t4, t5, t6, t7, t8;
70 thrd_create(&t1, (thrd_start_t)&a, NULL);
71 thrd_create(&t2, (thrd_start_t)&b, NULL);
72 thrd_create(&t3, (thrd_start_t)&c, NULL);
73 thrd_create(&t4, (thrd_start_t)&d, NULL);
74 thrd_create(&t5, (thrd_start_t)&e, NULL);
75 thrd_create(&t6, (thrd_start_t)&f, NULL);
76 thrd_create(&t7, (thrd_start_t)&g, NULL);
77 thrd_create(&t8, (thrd_start_t)&h, NULL);