From 5b6434266893e2871334f3083547565152e78b82 Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Wed, 30 Dec 2015 01:31:11 +0000 Subject: [PATCH] regressions/ck_epoch: Remove counter dependencies from torture parity test. --- regressions/ck_epoch/validate/torture.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/regressions/ck_epoch/validate/torture.c b/regressions/ck_epoch/validate/torture.c index 84d6f87..de86fe8 100644 --- a/regressions/ck_epoch/validate/torture.c +++ b/regressions/ck_epoch/validate/torture.c @@ -144,7 +144,6 @@ write_thread(void *unused CK_CC_UNUSED) { ck_epoch_record_t record; unsigned long iterations = 0; - unsigned int i = 1; bool c = ck_pr_faa_uint(&first, 1); ck_epoch_register(&epoch, &record); @@ -163,25 +162,28 @@ write_thread(void *unused CK_CC_UNUSED) * inside a protected section. Only * invalid.value <= valid.value is valid. */ - if (!c) ck_pr_store_uint(&valid.value, i); + if (!c) ck_pr_store_uint(&valid.value, 1); ck_epoch_synchronize(&record); - if (!c) ck_pr_store_uint(&invalid.value, i++); + if (!c) ck_pr_store_uint(&invalid.value, 1); - if (!c) ck_pr_store_uint(&valid.value, i); + ck_pr_fence_store(); + if (!c) ck_pr_store_uint(&valid.value, 2); ck_epoch_synchronize(&record); - if (!c) ck_pr_store_uint(&invalid.value, i++); + if (!c) ck_pr_store_uint(&invalid.value, 2); - if (!c) ck_pr_store_uint(&valid.value, i); + ck_pr_fence_store(); + if (!c) ck_pr_store_uint(&valid.value, 3); ck_epoch_synchronize(&record); - if (!c) ck_pr_store_uint(&invalid.value, i++); + if (!c) ck_pr_store_uint(&invalid.value, 3); - if (!c) ck_pr_store_uint(&valid.value, i); + ck_pr_fence_store(); + if (!c) ck_pr_store_uint(&valid.value, 4); ck_epoch_synchronize(&record); - if (!c) ck_pr_store_uint(&invalid.value, i++); + if (!c) ck_pr_store_uint(&invalid.value, 4); - if (!c) ck_pr_store_uint(&valid.value, i); ck_epoch_synchronize(&record); - if (!c) ck_pr_store_uint(&invalid.value, i++); + if (!c) ck_pr_store_uint(&invalid.value, 0); + ck_epoch_synchronize(&record); iterations += 4; } while (ck_pr_load_uint(&leave) == 0 &&