diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-07-22 13:37:48 +0200 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-07-23 22:34:54 +0200 |
| commit | e4e9db25624a93e8b02890a15bba0958db33c669 (patch) | |
| tree | ce69b71b37043df7b396f097ff8342305b4c92a2 /include/qemu | |
| parent | 23ad5711730f994d66520a3283aac2979d89389e (diff) | |
| download | focaccia-qemu-e4e9db25624a93e8b02890a15bba0958db33c669.tar.gz focaccia-qemu-e4e9db25624a93e8b02890a15bba0958db33c669.zip | |
util/fifo8: Introduce fifo8_drop()
Add the fifo8_drop() helper for clarity. It is a simple wrapper over fifo8_pop_buf(). Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-Id: <20240722160745.67904-8-philmd@linaro.org>
Diffstat (limited to 'include/qemu')
| -rw-r--r-- | include/qemu/fifo8.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/qemu/fifo8.h b/include/qemu/fifo8.h index bca6da306f..d1d06754d8 100644 --- a/include/qemu/fifo8.h +++ b/include/qemu/fifo8.h @@ -132,6 +132,15 @@ const uint8_t *fifo8_pop_bufptr(Fifo8 *fifo, uint32_t max, uint32_t *numptr); const uint8_t *fifo8_peek_bufptr(Fifo8 *fifo, uint32_t max, uint32_t *numptr); /** + * fifo8_drop: + * @fifo: FIFO to drop bytes + * @len: number of bytes to drop + * + * Drop (consume) bytes from a FIFO. + */ +void fifo8_drop(Fifo8 *fifo, uint32_t len); + +/** * fifo8_reset: * @fifo: FIFO to reset * |