From 2552550256dafd02f36391a98bbcf0c36f0bfb13 Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Fri, 9 Sep 2016 00:04:06 +0200 Subject: [PATCH] regressions/ck_hp: Make sure stores are visible before attempting CAS. --- regressions/ck_hp/validate/nbds_haz_test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/regressions/ck_hp/validate/nbds_haz_test.c b/regressions/ck_hp/validate/nbds_haz_test.c index c330cb3..9b85e76 100644 --- a/regressions/ck_hp/validate/nbds_haz_test.c +++ b/regressions/ck_hp/validate/nbds_haz_test.c @@ -98,9 +98,11 @@ stack_push_mpmc(struct stack *target, struct stack_entry *entry) lstack = ck_pr_load_ptr(&target->head); ck_pr_store_ptr(&entry->next, lstack); + ck_pr_fence_store(); while (ck_pr_cas_ptr_value(&target->head, lstack, entry, &lstack) == false) { ck_pr_store_ptr(&entry->next, lstack); + ck_pr_fence_store(); ck_backoff_eb(&backoff); }