[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 1/3] util/fifo8: implement push/pop of multip
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v4 1/3] util/fifo8: implement push/pop of multiple bytes |
Date: |
Tue, 28 Jan 2014 10:43:28 +0000 |
On 28 January 2014 00:04, Peter Crosthwaite
<address@hidden> wrote:
> On Tue, Jan 28, 2014 at 4:32 AM, Peter Maydell <address@hidden> wrote:
>>> void fifo8_reset(Fifo8 *fifo)
>>> {
>>> fifo->num = 0;
>>> + fifo->head = 0;
>>
>> This is a bug fix, right? It should go in its own patch.
>>
>
> No bug - where the ring buffer starts following a reset is undefined
> and need not be defined. But it improves the predicatability of the
> newly added pop_buf fn as you can now following a reset, guarantee
> that a single pop_buf will take all contents if its the first pop
> (which is how its being used in P2).
True. I still think it should have its own patch (and
indeed it would be worth saying what you just did as
part of the commit message for that patch...)
I think it's also nicer for any state that gets migrated
to be reset cleanly.
thanks
-- PMM
[Qemu-devel] [PATCH v4 3/3] hw/arm/allwinner-a10: initialize EMAC, Beniamino Galvani, 2014/01/26