All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Michael Walle <michael@walle.cc>, qemu-devel@nongnu.org
Cc: "Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH 2/3] qtest: new functions for pulsed IRQs
Date: Wed, 31 Oct 2018 11:19:36 +0100	[thread overview]
Message-ID: <34069906-b8f8-05da-477e-b2b81fc0fd58@redhat.com> (raw)
In-Reply-To: <20180718104836.18488-2-michael@walle.cc>

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

  parent reply	other threads:[~2018-10-31 10:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-18 10:48 [Qemu-devel] [PATCH 1/3] milkymist-pfpu: more accurate emulation Michael Walle
2018-07-18 10:48 ` [Qemu-devel] [PATCH 2/3] qtest: new functions for pulsed IRQs Michael Walle
2018-10-31  8:31   ` Michael Walle
2018-10-31  9:43     ` Andreas Färber
2018-10-31 10:19   ` Paolo Bonzini [this message]
2018-10-31 14:30     ` Michael Walle
2018-10-31 14:44       ` Paolo Bonzini
2018-07-18 10:48 ` [Qemu-devel] [PATCH 3/3] milkymist-pfpu: add qtests Michael Walle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=34069906-b8f8-05da-477e-b2b81fc0fd58@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=afaerber@suse.de \
    --cc=michael@walle.cc \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.