[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
- [RFC 0/4] transaction-based ptimer API, Peter Maydell, 2019/10/04
- [RFC 1/4] hw/timer/arm_timer: Add trace events, Peter Maydell, 2019/10/04
- [RFC 2/4] ptimer: Rename ptimer_init() to ptimer_init_with_bh(), Peter Maydell, 2019/10/04
- [RFC 4/4] hw/timer/arm_timer.c: Switch to transaction-based ptimer API, Peter Maydell, 2019/10/04
- [RFC 3/4] ptimer: Provide new transaction-based API, Peter Maydell, 2019/10/04
- Re: [RFC 0/4] transaction-based ptimer API, Paolo Bonzini, 2019/10/04