tests: lib: ringbuffer: Fix preempt_cnt not being reset

Counter was not reset between various tests which may hide the fact
that number of preemptions is less than expected.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruscinski 2021-09-01 11:47:28 +02:00 committed by Anas Nashif
parent ad6fc38b2f
commit 8ca8280cc3

View file

@ -343,6 +343,7 @@ static void thread_entry_spsc(void *p1, void *p2, void *p3)
NULL);
k_timer_user_data_set(&timer, rbuf);
preempt_cnt = 0;
consume_fn(rbuf, true);
produce_fn(rbuf, true);