zephyr/tests/subsys/rtio
Tom Burdick 49a97540dc rtio: Use an atomic completion counter
Rather than looking at the pool of completions for spinning use an
atomic counter of total completions ever done. The relative number of
completions being waited on by rtio_submit may then always be correctly
done.

Prior to this a race was possible, and understood, as
rtio_cqe_consumable was a likely but not guaranteed count of completions.
Sure enough on an SMP system the likely count was ahead of the actual
available completions and a race was caught by the simple test case.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-07-24 09:04:43 +00:00
..
rtio_api rtio: Use an atomic completion counter 2023-07-24 09:04:43 +00:00