History | View | Annotate | Download (2.7 kB)
util/fifo8: implement push/pop of multiple bytes
The patch adds functions fifo8_push_all() and fifo8_pop_buf() whichcan be used respectively to push the content of a memory buffer to thefifo and to pop multiple bytes obtaining a pointer to the fifo backing...
util/fifo8: clear fifo head upon reset
To improve the predictability of fifo8_pop_buf(), the fifo head is setto the start of data buffer upon a reset so that the first call to thefunction will be able to retrieve all data in the fifo.
Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>...
hw: move fifo.[ch] to libqemuutil
fifo.c is generic code that can be easily unit tested. So itbelongs in libqemuutil.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>