qemu-devel
[Top][All Lists]
Advanced

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

Re: [RFC 3/4] ptimer: Provide new transaction-based API


From: Peter Maydell
Subject: Re: [RFC 3/4] ptimer: Provide new transaction-based API
Date: Fri, 4 Oct 2019 13:56:48 +0100

On Fri, 4 Oct 2019 at 12:48, Peter Maydell <address@hidden> wrote:
>
> Provide the new transaction-based API.


> +void ptimer_transaction_begin(ptimer_state *s)
> +{
> +    assert(!s->in_transaction && s->callback);
> +    s->in_transaction = true;

As I was working on converting the ptimer tests to the new
API I noticed a silly bug here -- we should set
       s->need_reload = false;
in ptimer_transaction_begin(). Otherwise one transaction has
decided to do a reload, we'll do a reload in commit every time,
including when that's bogus (eg when the timer is disabled)...

thanks
-- PMM



reply via email to

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