]> git.proxmox.com Git - mirror_qemu.git/commit
util/fifo8: implement push/pop of multiple bytes
authorBeniamino Galvani <b.galvani@gmail.com>
Thu, 30 Jan 2014 22:02:04 +0000 (23:02 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Sat, 8 Feb 2014 14:50:48 +0000 (14:50 +0000)
commitc4e57af85272f98c28ccaaace040d2abb0ec85c4
tree938aac8abdac098c0fe345eabae33c033894ceb2
parent999b53ec8794f203964db3ecf939a3da5c4bc843
util/fifo8: implement push/pop of multiple bytes

The patch adds functions fifo8_push_all() and fifo8_pop_buf() which
can be used respectively to push the content of a memory buffer to the
fifo and to pop multiple bytes obtaining a pointer to the fifo backing
buffer.

In addition, it implements fifo8_num_free() and fifo8_num_used() which
allow to check if a multi-byte operation can be performed.

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>
include/qemu/fifo8.h
util/fifo8.c