qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 3/5] qxl: support concurrent async commands


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH 3/5] qxl: support concurrent async commands
Date: Mon, 24 Oct 2011 17:26:11 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110927 Red Hat/3.1.15-1.el6_1 Thunderbird/3.1.15

  Hi,

> +SpiceAsyncCommand *push_spice_async_command(PCIQXLDevice *qxl,
> +    uint32_t async_io, int size)

> +/* caller must call g_free */
> +static SpiceAsyncCommand *pop_spice_async_command(PCIQXLDevice *qxl,
> +                                                  uint64_t cookie)
> +{

push/pop naming implies stack-like operation, which isn't true though.
pop will lookup by cookie.  Also an explicit release function would be
good (list unlink and g_free call can go there).

Maybe have spice_async_cmd_{alloc,lookup,free} ?

Have you considered passing down a SpiceAsyncCommand pointer instead of
the cookie value everywhere?  Seems to be a bit cleaner and more
future-proof to me.  Not sure it buys us much in practice though, so
maybe it isn't worth the trouble.

cheers,
  Gerd



reply via email to

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