qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alon Levy <alevy@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org, mlureau@redhat.com, armbru@redhat.com,
	lcapitulino@redhat.com
Subject: Re: [Qemu-devel] [PATCH 3/5] qxl: support concurrent async commands
Date: Tue, 25 Oct 2011 14:19:33 +0200	[thread overview]
Message-ID: <20111025121933.GF3490@bow> (raw)
In-Reply-To: <4EA58393.1040901@redhat.com>

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	other threads:[~2011-10-25 12:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-24 12:02 [Qemu-devel] [PATCH 0/5] monitor+qxl: async monitor support Alon Levy
2011-10-24 12:02 ` [Qemu-devel] [PATCH 1/5] monitor: screen_dump async Alon Levy
2011-10-24 15:13   ` Gerd Hoffmann
2011-10-24 15:45     ` Luiz Capitulino
2011-10-24 17:29       ` Alon Levy
2011-10-25  0:31         ` Luiz Capitulino
2011-10-25 10:13           ` Alon Levy
2011-10-25 12:51             ` Luiz Capitulino
2011-10-25 13:21               ` Alon Levy
2011-10-25 18:41                 ` Luiz Capitulino
2011-10-26 11:48                   ` Alon Levy
2011-10-25  7:16       ` Gerd Hoffmann
2011-10-24 12:02 ` [Qemu-devel] [PATCH 2/5] qxl: s/__FUNCTION__/__func__/, change logging levels Alon Levy
2011-10-24 12:02 ` [Qemu-devel] [PATCH 3/5] qxl: support concurrent async commands Alon Levy
2011-10-24 15:26   ` Gerd Hoffmann
2011-10-25 12:19     ` Alon Levy [this message]
2011-10-24 12:02 ` [Qemu-devel] [PATCH 4/5] qxl: split qxl_render_display_resized Alon Levy
2011-10-24 12:02 ` [Qemu-devel] [PATCH 5/5] qxl: support async monitor screen dump Alon Levy
2011-10-24 15:29   ` Gerd Hoffmann
2011-10-24 17:30     ` Alon Levy

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=20111025121933.GF3490@bow \
    --to=alevy@redhat.com \
    --cc=armbru@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=mlureau@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).