qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC] Factor out fifos / circular buffers


From: Peter Crosthwaite
Subject: [Qemu-devel] [RFC] Factor out fifos / circular buffers
Date: Tue, 31 Jul 2012 20:20:02 +1000

Hi All,

A lot of devices have little internal fifos that are often implemented
as circular buffers in the device state. Any reason to not factor that
out into a helper module? Was thinkin just a struct defintion
containing the key elements (the uint8_t *data buffer, head/tail
pointers, capacity). and helper functions to create/destroy, put/get,
test for full/empty etc. And VMSD support - which will make devices a
lot cleaner if theres just one VM_STATE_FIFO instead of all these
little bits of implementation detail in the device state.

Regards,
Peter



reply via email to

[Prev in Thread] Current Thread [Next in Thread]