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 via email to