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: Alon Levy
Subject: Re: [Qemu-devel] [PATCH 3/5] qxl: support concurrent async commands
Date: Tue, 25 Oct 2011 14:19:33 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Oct 24, 2011 at 05:26:11PM +0200, Gerd Hoffmann wrote:
>   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} ?
> 
Will do.

> 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.
> 

That would still require casting, since we want to ensure we can later
support 32 bit architectures, so the cookie size of uint64_t will
remain. I guess I'll do it.

> cheers,
>   Gerd



reply via email to

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