fifo8: add fifo8_peek_buf() function
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Wed, 28 Aug 2024 12:22:56 +0000 (13:22 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Fri, 13 Sep 2024 18:11:13 +0000 (20:11 +0200)
commit28fbf33b3f6925dff8fcf1bae217d850d604a1d3
tree8b71ddf5d6d18f7f051ffdfe703e8ab1b084c0f5
parentcfc65db19bc9f796f338dc7220811471b6ab2f28
fifo8: add fifo8_peek_buf() function

This is a wrapper function around fifo8_peekpop_buf() that allows the
caller to peek into the FIFO, including handling the case where there
is a wraparound of the internal FIFO buffer.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Octavian Purdila <tavip@google.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240828122258.928947-8-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
include/qemu/fifo8.h
util/fifo8.c