You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
there is this sentence in the zephyr ring buffer docs
For the trivial case of one producer and one consumer, concurrency control shouldn’t be needed.
I have a simple case where data received over UART are filled into a ring buffer using ring_buf_put_claim() in an interrupt routine. Then there is a single thread which periodically access the data with ring_buf_get_claim(). I see very rare occurrences when the received data are wrong. After some time I have started to be suspicious about the ring buffer concurrency issue. Can it be the case here? Shouldn't I do ring_buf_get_claim() inside a critical section?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
there is this sentence in the zephyr ring buffer docs
I have a simple case where data received over UART are filled into a ring buffer
using ring_buf_put_claim()
in an interrupt routine. Then there is a single thread which periodically access the data withring_buf_get_claim()
. I see very rare occurrences when the received data are wrong. After some time I have started to be suspicious about the ring buffer concurrency issue. Can it be the case here? Shouldn't I doring_buf_get_claim()
inside a critical section?best regards
Jan
Beta Was this translation helpful? Give feedback.
All reactions