Merging upstream version 0.7.1 (Closes: #991419).

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-09 07:39:31 +01:00
parent 05c588e9d7
commit 9e09e0ef69
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
99 changed files with 6727 additions and 943 deletions

View file

@ -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)