Lines Matching refs:ezspsc
20 SPSC_DEFINE(ezspsc, uint32_t, 1); in ZTEST()
24 uint32_t *acq = spsc_acquire(&ezspsc); in ZTEST()
30 uint32_t *acq2 = spsc_acquire(&ezspsc); in ZTEST()
34 uint32_t *cons = spsc_consume(&ezspsc); in ZTEST()
38 zassert_equal(spsc_consumable(&ezspsc), 0, "Consumables should be 0"); in ZTEST()
40 spsc_produce(&ezspsc); in ZTEST()
42 zassert_equal(spsc_consumable(&ezspsc), 1, "Consumables should be 1"); in ZTEST()
44 uint32_t *cons2 = spsc_consume(&ezspsc); in ZTEST()
46 zassert_equal(spsc_consumable(&ezspsc), 0, "Consumables should be 0"); in ZTEST()
51 uint32_t *cons3 = spsc_consume(&ezspsc); in ZTEST()
56 uint32_t *acq3 = spsc_acquire(&ezspsc); in ZTEST()
60 spsc_release(&ezspsc); in ZTEST()
62 uint32_t *acq4 = spsc_acquire(&ezspsc); in ZTEST()
77 SPSC_DEFINE(ezspsc, uint32_t, 4); in ZTEST()
80 zassert_equal(spsc_consumable(&ezspsc), 0, "Consumables should be 0"); in ZTEST()
82 uint32_t *entry = spsc_acquire(&ezspsc); in ZTEST()
86 spsc_produce(&ezspsc); in ZTEST()
88 zassert_equal(spsc_consumable(&ezspsc), 3, "Consumables should be 3"); in ZTEST()
91 uint32_t *entry = spsc_consume(&ezspsc); in ZTEST()
95 spsc_release(&ezspsc); in ZTEST()
98 zassert_equal(spsc_consumable(&ezspsc), 0, "Consumables should be 0"); in ZTEST()
111 SPSC_DEFINE(ezspsc, uint32_t, 4); in ZTEST()
112 ezspsc._spsc.in = ATOMIC_INIT(UINTPTR_MAX - 2); in ZTEST()
113 ezspsc._spsc.out = ATOMIC_INIT(UINTPTR_MAX - 2); in ZTEST()
116 uint32_t *entry = spsc_acquire(&ezspsc); in ZTEST()
120 spsc_produce(&ezspsc); in ZTEST()
123 zassert_equal(atomic_get(&ezspsc._spsc.in), UINTPTR_MAX + 1, "Spsc in should wrap"); in ZTEST()
126 uint32_t *entry = spsc_consume(&ezspsc); in ZTEST()
130 spsc_release(&ezspsc); in ZTEST()
133 zassert_equal(atomic_get(&ezspsc._spsc.out), UINTPTR_MAX + 1, "Spsc out should wrap"); in ZTEST()
146 struct spsc_spsc *ezspsc = p1; in t1_consume() local
154 val = spsc_consume(ezspsc); in t1_consume()
158 spsc_release(ezspsc); in t1_consume()
170 struct spsc_spsc *ezspsc = p1; in t2_produce() local
178 val = spsc_acquire(ezspsc); in t2_produce()
183 spsc_produce(ezspsc); in t2_produce()