qemu-devel
[Top][All Lists]
Advanced

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

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


From: Peter Crosthwaite
Subject: Re: [Qemu-devel] [RFC] Factor out fifos / circular buffers
Date: Thu, 2 Aug 2012 11:40:05 +1000

Alright,

Ive put something together. Will CC on a series that will include it shortly.

Regards,
Peter

On Wed, Aug 1, 2012 at 5:08 AM, Igor Mitsyanko <address@hidden> wrote:
> On 07/31/2012 02:20 PM, Peter Crosthwaite wrote:
>>
>> 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
>>
>>
>
> Just yesterday I thought, why there is no builtin FIFO api in QEMU?
>
> I think majority of device models use fifos with length which is a power of
> 2, I think that's the way to go for these helpers at first.



reply via email to

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