From b07c7808ce8fe0410064a220f6f6eabed2229bd1 Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Mon, 1 Oct 2012 17:59:10 -0400 Subject: [PATCH] regressions/ck_ring: Add strict fence around barrier and cache align ring. --- regressions/ck_ring/validate/ck_ring_spmc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/regressions/ck_ring/validate/ck_ring_spmc.c b/regressions/ck_ring/validate/ck_ring_spmc.c index 22b5fdc..39c062a 100644 --- a/regressions/ck_ring/validate/ck_ring_spmc.c +++ b/regressions/ck_ring/validate/ck_ring_spmc.c @@ -54,7 +54,7 @@ struct entry { static int nthr; static ck_ring_t *ring; -static ck_ring_t ring_spmc; +static ck_ring_t ring_spmc CK_CC_CACHELINE; static struct affinity a; static int size; static volatile int barrier; @@ -74,6 +74,7 @@ test_spmc(void *c) } tid = ck_pr_faa_int(&eb, 1); + ck_pr_fence_memory(); while (ck_pr_load_int(&eb) != nthr - 1); for (i = 0; i < ITERATIONS; i++) {