[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 1/7] Add support for generic notifier lists
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] Re: [PATCH 1/7] Add support for generic notifier lists |
Date: |
Thu, 11 Mar 2010 14:25:37 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100120 Fedora/3.0.1-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.1 |
On 03/11/2010 01:57 PM, Paul Brook wrote:
+struct QEMUNotifier
> +{
> + void (*notify)(QEMUNotifier *notifier);
> +};
I suggest combining this with QEMUBH.
I didn't understand this suggestion exactly, but I think it's related
that I didn't understand the advantage of making QEMUNotifier a struct.
Instead of using container_of, reusing QEMUBHFunc (renamed to
QEMUCallbackFunc maybe?) in QEMUNotifierNode like this:
struct QEMUNotifierNode {
QEMUCallbackFunc notify;
void *opaque;
QTAILQ_ENTRY(QEMUNotifierNode) node;
};
void qemu_notifier_list_init(QEMUNotifierList *list);
struct QEMUNotifierNode *
qemu_notifier_list_add(QEMUNotifierList *list,
QEMUCallbackFunc notify, void *opaque);
void qemu_notifier_list_remove(QEMUNotifierList *list,
QEMUNotifierNode *notifier);
void qemu_notifier_list_notify(QEMUNotifierList *list);
seems cleaner. You would place the QEMUNotifierNode in VncState in
order to do the removal later.
Besides this, the patchset is very nice indeed.
Paolo
- [Qemu-devel] [PATCH 1/7] Add support for generic notifier lists, Anthony Liguori, 2010/03/10
- [Qemu-devel] [PATCH 2/7] Rewrite mouse handlers to use QTAILQ and to have an activation function, Anthony Liguori, 2010/03/10
- [Qemu-devel] [PATCH 5/7] Expose whether a mouse is an absolute device via QMP and the human monitor., Anthony Liguori, 2010/03/10
- [Qemu-devel] [PATCH 3/7] Add kbd_mouse_has_absolute(), Anthony Liguori, 2010/03/10
- [Qemu-devel] [PATCH 6/7] input: make vnc use mouse mode notifiers, Anthony Liguori, 2010/03/10
- [Qemu-devel] [PATCH 7/7] sdl: use mouse mode notifier, Anthony Liguori, 2010/03/10
- [Qemu-devel] [PATCH 4/7] Add notifier for mouse mode changes, Anthony Liguori, 2010/03/10
- Re: [Qemu-devel] [PATCH 1/7] Add support for generic notifier lists, Paul Brook, 2010/03/11
- [Qemu-devel] Re: [PATCH 1/7] Add support for generic notifier lists,
Paolo Bonzini <=
- [Qemu-devel] Re: [PATCH 1/7] Add support for generic notifier lists, Paul Brook, 2010/03/11
- [Qemu-devel] Re: [PATCH 1/7] Add support for generic notifier lists, Paolo Bonzini, 2010/03/11
- Re: [Qemu-devel] Re: [PATCH 1/7] Add support for generic notifier lists, Anthony Liguori, 2010/03/11
Re: [Qemu-devel] [PATCH 1/7] Add support for generic notifier lists, Anthony Liguori, 2010/03/11