diff --git a/regressions/ck_ring/validate/ck_ring_spmc.c b/regressions/ck_ring/validate/ck_ring_spmc.c index 6231745..78e6d7c 100644 --- a/regressions/ck_ring/validate/ck_ring_spmc.c +++ b/regressions/ck_ring/validate/ck_ring_spmc.c @@ -82,7 +82,11 @@ test_spmc(void *c) struct entry *o; /* Keep trying until we encounter at least one node. */ - while (ck_ring_dequeue_spmc(&ring_spmc, &o) == false); + if (j & 1) { + while (ck_ring_dequeue_spmc(&ring_spmc, &o) == false); + } else { + while (ck_ring_trydequeue_spmc(&ring_spmc, &o) == false); + } observed++; if (o->value < 0 diff --git a/regressions/ck_ring/validate/ck_ring_spmc_template.c b/regressions/ck_ring/validate/ck_ring_spmc_template.c index 83839bc..ad23e16 100644 --- a/regressions/ck_ring/validate/ck_ring_spmc_template.c +++ b/regressions/ck_ring/validate/ck_ring_spmc_template.c @@ -83,7 +83,13 @@ test_spmc(void *c) struct entry o; /* Keep trying until we encounter at least one node. */ - while (CK_RING_DEQUEUE_SPMC(spmc_ring, &ring_spmc, &o) == false); + if (j & 1) { + while (CK_RING_DEQUEUE_SPMC(spmc_ring, + &ring_spmc, &o) == false); + } else { + while (CK_RING_TRYDEQUEUE_SPMC(spmc_ring, + &ring_spmc, &o) == false); + } observed++; if (o.value < 0