12 static void a(void *obj)
14 atomic_store_explicit(&x1, 1,memory_order_seq_cst);
17 static void b(void *obj)
19 atomic_load_explicit(&x1, memory_order_seq_cst);
20 atomic_store_explicit(&x2, 1,memory_order_seq_cst);
23 static void c(void *obj)
25 atomic_load_explicit(&x2, memory_order_seq_cst);
26 atomic_store_explicit(&x3, 1,memory_order_seq_cst);
29 static void d(void *obj)
31 atomic_load_explicit(&x3, memory_order_seq_cst);
32 atomic_store_explicit(&x4, 1,memory_order_seq_cst);
35 static void e(void *obj)
37 atomic_load_explicit(&x4, memory_order_seq_cst);
38 atomic_store_explicit(&x5, 1,memory_order_seq_cst);
41 static void f(void *obj)
43 atomic_load_explicit(&x5, memory_order_seq_cst);
44 atomic_store_explicit(&x6, 1,memory_order_seq_cst);
47 static void g(void *obj)
49 atomic_load_explicit(&x6, memory_order_seq_cst);
50 atomic_store_explicit(&x7, 1,memory_order_seq_cst);
52 static void h(void *obj)
54 atomic_load_explicit(&x7, memory_order_seq_cst);
55 atomic_load_explicit(&x1, memory_order_seq_cst);
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);