[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/3] qtest: new functions for pulsed IRQs
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 2/3] qtest: new functions for pulsed IRQs |
Date: |
Wed, 31 Oct 2018 11:19:36 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 |
On 18/07/2018 12:48, Michael Walle wrote:
> /**
> + * get_irq_latched:
> + * @num: Interrupt to observe.
> + *
> + * Returns: The latched level of the @num interrupt.
> + */
> +static inline bool get_irq_latched(int num)
> +{
> + return qtest_get_irq_latched(global_qtest, num);
> +}
> +
> +/**
> + * clear_irq_latch:
> + * @num: Interrupt to operate on.
> + *
> + * Clears the latch of the @num interrupt.
> + */
> +static inline void clear_irq_latch(int num)
> +{
> + return qtest_clear_irq_latch(global_qtest, num);
> +}
> +
> +/**
> * irq_intercept_in:
> * @string: QOM path of a device.
> *
>
Just one thing, I think an atomic test-and-clear is a better API. I
understand that what you have works, because
get_irq_latched+clear_irq_latch don't have any intervening access to the
qtest socket.
Paolo