mirror of
https://github.com/Dasharo/zephyr.git
synced 2026-03-06 14:57:20 -08:00
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>