qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Octavian Purdila <tavip@google.com>, qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org, stefanst@google.com, pbonzini@redhat.com,
	peter.maydell@linaro.org, marcandre.lureau@redhat.com,
	berrange@redhat.com, eduardo@habkost.net, luc@lmichel.fr,
	damien.hedde@dahe.fr, alistair@alistair23.me, thuth@redhat.com,
	jsnow@redhat.com, crosa@redhat.com, lvivier@redhat.com
Subject: Re: [RFC PATCH v3 01/24] fifo32: add peek function
Date: Fri, 6 Sep 2024 13:53:16 +0200	[thread overview]
Message-ID: <0fa93707-d092-4db5-a4a4-f000df881ccd@linaro.org> (raw)
In-Reply-To: <20240827064529.1246786-2-tavip@google.com>

Hi Octavian,

On 27/8/24 08:45, Octavian Purdila wrote:
> Add fifo32_peek() that returns the first element from the queue
> without popping it.
> 
> Signed-off-by: Octavian Purdila <tavip@google.com>
> ---
>   include/qemu/fifo32.h | 28 ++++++++++++++++++++++++++++
>   1 file changed, 28 insertions(+)
> 
> diff --git a/include/qemu/fifo32.h b/include/qemu/fifo32.h
> index 4e9fd1b5ef..77aab488ae 100644
> --- a/include/qemu/fifo32.h
> +++ b/include/qemu/fifo32.h
> @@ -140,6 +140,34 @@ static inline uint32_t fifo32_pop(Fifo32 *fifo)
>       return ret;
>   }
>   
> +/**
> + * fifo32_peek:
> + * @fifo: fifo to peek at
> + *
> + * Returns the value from the FIFO's head without poping it. Behaviour
> + * is undefined if the FIFO is empty. Clients are responsible for
> + * checking for emptiness using fifo32_is_empty().
> + *
> + * Returns: the value from the FIFO's head
> + */
> +
> +static inline uint32_t fifo32_peek(Fifo32 *fifo)

When respinning on top of Mark's Fifo8 work, please un-inline.



  reply	other threads:[~2024-09-06 11:53 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-27  6:45 [RFC PATCH v3 00/24] NXP i.MX RT595 Octavian Purdila
2024-08-27  6:45 ` [RFC PATCH v3 01/24] fifo32: add peek function Octavian Purdila
2024-09-06 11:53   ` Philippe Mathieu-Daudé [this message]
2024-09-17  7:40     ` Octavian Purdila
2024-08-27  6:45 ` [RFC PATCH v3 02/24] tests/unit: add fifo test Octavian Purdila
2024-08-27  6:45 ` [RFC PATCH v3 03/24] scripts: add script to generate C header files from SVD XML files Octavian Purdila
2024-08-27  6:45 ` [RFC PATCH v3 04/24] Add mcux-soc-svd subproject Octavian Purdila
2024-08-27  6:45 ` [RFC PATCH v3 05/24] hw/misc: add basic flexcomm device model Octavian Purdila
2024-08-27  6:45 ` [RFC PATCH v3 06/24] hw/char: add support for flexcomm usart Octavian Purdila
2024-08-27  6:45 ` [RFC PATCH v3 07/24] hw/i2c: add support for flexcomm i2c Octavian Purdila
2024-08-27  6:45 ` [RFC PATCH v3 08/24] hw/ssi: add support for flexcomm spi Octavian Purdila
2024-08-27  6:45 ` [RFC PATCH v3 09/24] hw/misc: add support for RT500's clock controller Octavian Purdila
2024-08-27  6:45 ` [RFC PATCH v3 10/24] hw/ssi: add support for flexspi Octavian Purdila
2024-08-27  6:45 ` [RFC PATCH v3 11/24] hw/misc: add support for RT500's reset controller Octavian Purdila
2024-08-27  6:45 ` [RFC PATCH v3 12/24] hw/arm: add basic support for the RT500 SoC Octavian Purdila
2024-08-27 16:04   ` Philippe Mathieu-Daudé
2024-08-27  6:45 ` [RFC PATCH v3 13/24] hw/arm: add RT595-EVK board Octavian Purdila
2024-08-27  6:45 ` [RFC PATCH v3 14/24] tests/qtest: add register access macros and functions Octavian Purdila
2024-08-27  6:45 ` [RFC PATCH v3 15/24] system/qtest: add APIS to check for memory access failures Octavian Purdila
2024-08-27  6:45 ` [RFC PATCH v3 16/24] tests/qtest: add flexcomm tests Octavian Purdila
2024-08-27  6:45 ` [RFC PATCH v3 17/24] tests/qtest: add flexcomm usart tests Octavian Purdila
2024-08-27  6:45 ` [RFC PATCH v3 18/24] hw/misc: add i2c-tester Octavian Purdila
2024-08-27  6:45 ` [RFC PATCH v3 19/24] tests/qtest: add tests for flexcomm i2c Octavian Purdila
2024-08-27  6:45 ` [RFC PATCH v3 20/24] hw/ssi: allow NULL realize callbacks for peripherals Octavian Purdila
2024-08-27  6:45 ` [RFC PATCH v3 21/24] hw/misc: add spi-tester Octavian Purdila
2024-08-27  6:45 ` [RFC PATCH v3 22/24] tests/qtest: add tests for flexcomm spi Octavian Purdila
2024-08-27  6:45 ` [RFC PATCH v3 23/24] systems/qtest: add device clock APIs Octavian Purdila
2024-08-27  6:45 ` [RFC PATCH v3 24/24] test/unit: add unit tests for RT500's clock controller Octavian Purdila

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=0fa93707-d092-4db5-a4a4-f000df881ccd@linaro.org \
    --to=philmd@linaro.org \
    --cc=alistair@alistair23.me \
    --cc=berrange@redhat.com \
    --cc=crosa@redhat.com \
    --cc=damien.hedde@dahe.fr \
    --cc=eduardo@habkost.net \
    --cc=jsnow@redhat.com \
    --cc=luc@lmichel.fr \
    --cc=lvivier@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanst@google.com \
    --cc=tavip@google.com \
    --cc=thuth@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).