[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 06/12] char: add an edge event API for the front
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH 06/12] char: add an edge event API for the front ends |
Date: |
Mon, 1 Aug 2011 16:39:29 +0100 |
On Mon, Aug 1, 2011 at 3:23 PM, Anthony Liguori <address@hidden> wrote:
> Signed-off-by: Anthony Liguori <address@hidden>
> ---
> qemu-char.c | 91
> +++++++++++++++++++++++++++++++++++++++++++++++++----------
> qemu-char.h | 9 ++++++
> 2 files changed, 85 insertions(+), 15 deletions(-)
>
> diff --git a/qemu-char.c b/qemu-char.c
> index 0e4a30c..9e40e04 100644
> --- a/qemu-char.c
> +++ b/qemu-char.c
> @@ -139,13 +139,23 @@ void qemu_chr_generic_open(CharDriverState *s)
> }
> }
>
> +static uint32_t char_queue_get_avail(CharQueue *q)
> +{
> + return sizeof(q->ring) - (q->prod - q->cons);
> +}
> +
> +static bool char_queue_get_empty(CharQueue *q)
> +{
> + return (q->cons == q->prod);
> +}
bool function naming nitpick: char_queue_is_empty() is clearer than
char_queue_get_empty(). "is" and "has" are always bool, "get" could
return anything.
Stefan
[Qemu-devel] [PATCH 03/12] char: introduce tx queue to enable Unix style flow control, Anthony Liguori, 2011/08/01
[Qemu-devel] [PATCH 07/12] char: add backend edge notification interface, Anthony Liguori, 2011/08/01
[Qemu-devel] [PATCH 05/12] char: add read functions for backend and frontend, Anthony Liguori, 2011/08/01
[Qemu-devel] [PATCH 06/12] char: add an edge event API for the front ends, Anthony Liguori, 2011/08/01
- Re: [Qemu-devel] [PATCH 06/12] char: add an edge event API for the front ends,
Stefan Hajnoczi <=
[Qemu-devel] [PATCH 09/12] char: rename qemu_chr_guest_open() -> qemu_chr_fe_open(), Anthony Liguori, 2011/08/01
[Qemu-devel] [PATCH 11/12] char: make all devices do qemu_chr_fe_open(), Anthony Liguori, 2011/08/01
[Qemu-devel] [PATCH 08/12] char: make monitor use new style interface, Anthony Liguori, 2011/08/01
[Qemu-devel] [PATCH 10/12] char: rename qemu_chr_guest_close() -> qemu_chr_fe_close(), Anthony Liguori, 2011/08/01
[Qemu-devel] [PATCH 12/12] char: enforce the use of qemu_chr_guest_open(), Anthony Liguori, 2011/08/01
[Qemu-devel] [PATCH 04/12] char: introduce backend tx queue, Anthony Liguori, 2011/08/01