qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, "Andreas Färber" <afaerber@suse.de>
Subject: [Qemu-devel] [RFC] qom: Sorted class enumeration
Date: Wed, 22 Feb 2012 10:44:34 +0100	[thread overview]
Message-ID: <1329903875-3357-1-git-send-email-afaerber@suse.de> (raw)

Hello,

For listing registered CPU classes I needed a way to sort classes in a
custom (i.e., non-hashtable) order. I found it easiest to sort the classes
using the existing foreach infrastructure, on the go via GLib's binary tree.

Patch is still missing documentation, but do you think this is the right
direction, Anthony?

I've been wondering if it might make sense to replace the current filtering
mechanism (abstract and type) with another callback function or whether that
would be overkill - currently the only other filtering I needed to do was
to ignore the "host" CPU class, which can be done by simple if in the callback.

Regards,
Andreas

Andreas Färber (1):
  qom: Introduce object_class_foreach_ordered()

 include/qemu/object.h |    6 ++++++
 qom/object.c          |   43 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+), 0 deletions(-)

-- 
1.7.7

             reply	other threads:[~2012-02-22  9:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-22  9:44 Andreas Färber [this message]
2012-02-22  9:44 ` [Qemu-devel] [PATCH RFC] qom: Introduce object_class_foreach_ordered() Andreas Färber
2012-02-22 13:25 ` [Qemu-devel] [RFC] qom: Sorted class enumeration Anthony Liguori

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=1329903875-3357-1-git-send-email-afaerber@suse.de \
    --to=afaerber@suse.de \
    --cc=pbonzini@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).