qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 09/12] FIFO: Add a FIFO32 implementation


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v3 09/12] FIFO: Add a FIFO32 implementation
Date: Thu, 10 Mar 2016 17:25:43 +0700

On 2 March 2016 at 05:27, Jean-Christophe Dubois <address@hidden> wrote:
> This one is build on top of the existing FIFO8
>
> Signed-off-by: Jean-Christophe Dubois <address@hidden>
> ---
>
> Changes since v1:
>  * None
>
> Changes since v2:
>  * Added copyright
>  * define Fifo32 as a struct containing Fifo8
>  * remove fifo32_pop_buf()
>
>  include/qemu/fifo32.h | 186 
> ++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 186 insertions(+)
>  create mode 100644 include/qemu/fifo32.h
>
> diff --git a/include/qemu/fifo32.h b/include/qemu/fifo32.h
> new file mode 100644
> index 0000000..f1b9ecf
> --- /dev/null
> +++ b/include/qemu/fifo32.h
> @@ -0,0 +1,186 @@
> +/*
> + * Generic FIFO32 component, based on FIFO8.
> + *
> + * Copyright (c) 2016 Jean-Christophe Dubois
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * as published by the Free Software Foundation; either version
> + * 2 of the License, or (at your option) any later version.
> + *
> + * You should have received a copy of the GNU General Public License along
> + * with this program; if not, see <http://www.gnu.org/licenses/>.
> + */
> +
> +#ifndef FIFO32_H
> +#define FIFO32_H
> +
> +#include "qemu/osdep.h"
> +#include "qemu/fifo8.h"
> +
> +typedef struct {
> +    Fifo8 fifo;
> +} Fifo32;
> +
> +/**
> + * fifo32_create:
> + * @fifo: struct Fifo32 to initialise with new FIFO
> + * @capacity: capacity of the newly created FIFO expressed in 32 bits words

"32 bits word" should be "32 bit word" throughout.

There should be a comment somewhere noting that there is no
fifo32_pop_buf() because the data is not stored in the buffer
as a set of native-order words.

Otherwise
Reviewed-by: Peter Maydell <address@hidden>

thanks
-- PMM



reply via email to

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