summaryrefslogtreecommitdiffstats
path: root/regressions/ck_epoch/validate/ck_epoch_section_2.c
diff options
context:
space:
mode:
Diffstat (limited to 'regressions/ck_epoch/validate/ck_epoch_section_2.c')
-rw-r--r--regressions/ck_epoch/validate/ck_epoch_section_2.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/regressions/ck_epoch/validate/ck_epoch_section_2.c b/regressions/ck_epoch/validate/ck_epoch_section_2.c
index aed3661..dcb3fd0 100644
--- a/regressions/ck_epoch/validate/ck_epoch_section_2.c
+++ b/regressions/ck_epoch/validate/ck_epoch_section_2.c
@@ -64,7 +64,7 @@ read_thread(void *unused CK_CC_UNUSED)
record = malloc(sizeof *record);
assert(record != NULL);
- ck_epoch_register(&epoch, record);
+ ck_epoch_register(&epoch, record, NULL);
if (aff_iterate(&a)) {
perror("ERROR: failed to affine thread");
@@ -110,11 +110,14 @@ read_thread(void *unused CK_CC_UNUSED)
}
ck_epoch_begin(record, &section[1]);
-
- assert(section[0].bucket != section[1].bucket);
+ if (section[0].bucket == section[1].bucket) {
+ ck_error("%u == %u\n",
+ section[0].bucket, section[1].bucket);
+ }
ck_epoch_end(record, &section[0]);
- assert(ck_pr_load_uint(&record->active) > 0);
+ if (ck_pr_load_uint(&record->active) == 0)
+ ck_error("active: %u\n", record->active);
if (ck_pr_load_uint(&leave) == 1) {
ck_epoch_end(record, &section[1]);
@@ -130,10 +133,14 @@ read_thread(void *unused CK_CC_UNUSED)
static void *
write_thread(void *unused CK_CC_UNUSED)
{
- ck_epoch_record_t record;
+ ck_epoch_record_t *record;
unsigned long iterations = 0;
- ck_epoch_register(&epoch, &record);
+ record = malloc(sizeof *record);
+ if (record == NULL)
+ ck_error("record allocation failure");
+
+ ck_epoch_register(&epoch, record, NULL);
if (aff_iterate(&a)) {
perror("ERROR: failed to affine thread");
@@ -147,7 +154,7 @@ write_thread(void *unused CK_CC_UNUSED)
if (!(iterations % 1048575))
fprintf(stderr, ".");
- ck_epoch_synchronize(&record);
+ ck_epoch_synchronize(record);
iterations++;
if (ck_pr_load_uint(&leave) == 1)