lib: os: mpsc_pbuf: Fix infinite loop during allocation
It was possible that allocation was continuously attempting to find
space. It could happen if allocation interrupted consuming a packet
(which is marked as busy) and there is not enough space to allocate
requested packet but there would be if busy packet was freed.
Algorithm in that case was continuously going through the buffer
in search for packets that can be dropped to find space for the
new packet.
Signed-off-by:
Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Loading
Please sign in to comment