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

@ -37,6 +37,7 @@ static void
cb(ck_epoch_entry_t *p)
{
/* Test that we can reregister the callback. */
if (counter == 0)
ck_epoch_call(&record[1], p, cb);
@ -50,15 +51,22 @@ int
main(void)
{
ck_epoch_entry_t entry;
ck_epoch_entry_t another;
ck_epoch_register(&epoch, &record[0]);
ck_epoch_register(&epoch, &record[1]);
ck_epoch_register(&epoch, &record[0], NULL);
ck_epoch_register(&epoch, &record[1], NULL);
ck_epoch_call(&record[1], &entry, cb);
ck_epoch_barrier(&record[1]);
ck_epoch_barrier(&record[1]);
if (counter != 2)
ck_error("Expected counter value 2, read %u.\n", counter);
/* Make sure that strict works. */
ck_epoch_call_strict(&record[1], &entry, cb);
ck_epoch_call_strict(&record[1], &another, cb);
ck_epoch_barrier(&record[1]);
if (counter != 4)
ck_error("Expected counter value 4, read %u.\n", counter);
return 0;
}