Lines Matching refs:a
188 char a[123]; // Everything in different cache lines, member
197 three_atomics* a = reinterpret_cast<three_atomics*>(arg); in writer() local
199 atomic_store_explicit(&a->x, i, memory_order_relaxed); in writer()
200 atomic_store_explicit(&a->z, i, memory_order_relaxed); in writer()
201 atomic_store_explicit(&a->y, i, memory_order_release); in writer()
202 atomic_store_explicit(&a->x, i+1, memory_order_relaxed); in writer()
203 atomic_store_explicit(&a->z, i+1, memory_order_relaxed); in writer()
204 atomic_store_explicit(&a->y, i+1, memory_order_release); in writer()
210 three_atomics* a = reinterpret_cast<three_atomics*>(arg); in reader() local
215 yval = atomic_load_explicit(&a->y, memory_order_acquire); in reader()
216 zval = atomic_load_explicit(&a->z, memory_order_relaxed); in reader()
217 xval = atomic_load_explicit(&a->x, memory_order_relaxed); in reader()
244 three_atomics a; in TEST() local
245 atomic_init(&a.x, 0ul); in TEST()
246 atomic_init(&a.y, 0ul); in TEST()
247 atomic_init(&a.z, 0ul); in TEST()
249 ASSERT_EQ(0, pthread_create(&t1, nullptr, reader, &a)); in TEST()
250 ASSERT_EQ(0, pthread_create(&t2, nullptr, writer, &a)); in TEST()
255 EXPECT_EQ(atomic_load_explicit(&a.x, memory_order_consume), BIG + 1); in TEST()
256 EXPECT_EQ(atomic_load_explicit(&a.y, memory_order_seq_cst), BIG + 1); in TEST()
257 EXPECT_EQ(atomic_load(&a.z), BIG + 1); in TEST()