From ea9658d8d80f1917d65ee627dfc52c6bb5b0b31d Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Sun, 20 Sep 2015 22:36:32 -0400 Subject: [PATCH] regressions: Switch to volatile load on ready flag. --- regressions/ck_cohort/benchmark/throughput.c | 2 +- regressions/ck_pr/benchmark/benchmark.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/regressions/ck_cohort/benchmark/throughput.c b/regressions/ck_cohort/benchmark/throughput.c index 50ede34..7c4776d 100644 --- a/regressions/ck_cohort/benchmark/throughput.c +++ b/regressions/ck_cohort/benchmark/throughput.c @@ -123,7 +123,7 @@ fairness(void *null) ck_pr_inc_uint(&barrier); while (ck_pr_load_uint(&barrier) != nthr); - while (ready) { + while (ck_pr_load_uint(&ready)) { CK_COHORT_LOCK(basic, cohort, NULL, NULL); count[i].value++; diff --git a/regressions/ck_pr/benchmark/benchmark.h b/regressions/ck_pr/benchmark/benchmark.h index 24cd42c..f9e4ed2 100644 --- a/regressions/ck_pr/benchmark/benchmark.h +++ b/regressions/ck_pr/benchmark/benchmark.h @@ -40,7 +40,7 @@ fairness(void *null) } while (ck_pr_load_uint(&ready) == 0); - while (ready) { + while (ck_pr_load_uint(&ready)) { ATOMIC; ATOMIC; ATOMIC;