From 97daff64eac15f05e144d1b47572b4ea4e4ed2a5 Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Tue, 14 May 2019 18:11:52 -0400 Subject: [PATCH] ck_sequence: reduce thread count to account for writer. --- regressions/ck_sequence/validate/ck_sequence.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/regressions/ck_sequence/validate/ck_sequence.c b/regressions/ck_sequence/validate/ck_sequence.c index e0bc700..47de852 100644 --- a/regressions/ck_sequence/validate/ck_sequence.c +++ b/regressions/ck_sequence/validate/ck_sequence.c @@ -122,7 +122,7 @@ main(int argc, char *argv[]) ck_error("Usage: ck_sequence \n"); } - n_threads = atoi(argv[1]); + n_threads = atoi(argv[1]) - 1; if (n_threads <= 0) { ck_error("ERROR: Number of threads must be greater than 0\n"); } @@ -163,6 +163,8 @@ main(int argc, char *argv[]) counter++; if (ck_pr_load_uint(&barrier) == 0) break; + + ck_pr_stall(); } printf("%u updates made.\n", counter);