Closed iabdalkader closed 1 year ago
Memory usage change @ e21c57bb4bf698012532d93638ff6f1cab8007d0
Board | flash | % | RAM for global variables | % |
---|---|---|---|---|
arduino:mbed_giga:giga |
:small_red_triangle: +136 - +632 | +0.01 - +0.03 | :grey_question: -176 - +8 | -0.03 - 0.0 |
Hi @aentinger can you please review this and if it looks good, merge and do another release ? Thanks.
is the new buffer implementation "threadsafe"? I'm asking because I'm not seeing any locking
Yes it should be very safe, the old one shared the variables between push/pop producer/consumer sides, this one even if the tail/head is moved during push/pop it should still be safe and there's no shared size
variable used. Also note we can't really use locking as the IRQ also needs to write to this queue, so we'll have to use critical sections, but I don't think anything else is needed, I also did some stress testing on this and couldn't find any issues.
Check, thanks for the clarification :+1: