OSDN Git Service

util/fifo8: clear fifo head upon reset
authorBeniamino Galvani <b.galvani@gmail.com>
Thu, 30 Jan 2014 22:02:05 +0000 (23:02 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Sat, 8 Feb 2014 14:50:48 +0000 (14:50 +0000)
commit58892d4782bf516e8356e3adfe4fc9b10c397b2f
tree70f8c399ddefcbbeea7aeb49428e0a253a8c46c8
parentc4e57af85272f98c28ccaaace040d2abb0ec85c4
util/fifo8: clear fifo head upon reset

To improve the predictability of fifo8_pop_buf(), the fifo head is set
to the start of data buffer upon a reset so that the first call to the
function will be able to retrieve all data in the fifo.

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
util/fifo8.c