From d24fc277adb40d711f7a25dc7ad0404cc1c1a2fe Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Mon, 27 Feb 2017 15:19:14 -0500 Subject: [PATCH] epoch: fix idle detection bug in synchronize. An idle grace period requires all threads to be idle. This optimization introduced a regression with idle detection if subset of threads are both active and idle. Unfortunately, none of our test machines detected the problem. This issue was reported by Julie Zhao --- src/ck_epoch.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ck_epoch.c b/src/ck_epoch.c index 7cddfa7..a0e9180 100644 --- a/src/ck_epoch.c +++ b/src/ck_epoch.c @@ -309,11 +309,12 @@ ck_epoch_scan(struct ck_epoch *global, { ck_stack_entry_t *cursor; - *af = false; if (cr == NULL) { cursor = CK_STACK_FIRST(&global->records); + *af = false; } else { cursor = &cr->record_next; + *af = true; } while (cursor != NULL) {