[Qemu-devel] Re: [PATCH 1/7] Add support for generic notifier lists (v2)

2010-03-16 Thread Juan Quintela
Anthony Liguori wrote: > Notifiers are data-less callbacks and a notifier list is a list of registered > notifiers that all are interested in a particular event. > > We'll use this in a few patches to implement mouse change notification. We could use that for migration also. spice just needs to

[Qemu-devel] Re: [PATCH 1/7] Add support for generic notifier lists (v2)

2010-03-16 Thread Avi Kivity
On 03/15/2010 10:34 PM, Anthony Liguori wrote: Notifiers are data-less callbacks and a notifier list is a list of registered notifiers that all are interested in a particular event. We'll use this in a few patches to implement mouse change notification. Looks nicer & lighter! -- error com

Re: [Qemu-devel] Re: [PATCH 1/7] Add support for generic notifier lists

2010-03-11 Thread Anthony Liguori
On 03/11/2010 08:42 AM, Avi Kivity wrote: On 03/11/2010 04:36 PM, Paolo Bonzini wrote: On 03/11/2010 02:42 PM, Avi Kivity wrote: On 03/11/2010 03:25 PM, Paolo Bonzini wrote: I didn't understand the advantage of making QEMUNotifier a struct. Instead of using container_of, reusing QEMUBHFunc (re

Re: [Qemu-devel] Re: [PATCH 1/7] Add support for generic notifier lists

2010-03-11 Thread Avi Kivity
On 03/11/2010 04:36 PM, Paolo Bonzini wrote: On 03/11/2010 02:42 PM, Avi Kivity wrote: On 03/11/2010 03:25 PM, Paolo Bonzini wrote: I didn't understand the advantage of making QEMUNotifier a struct. Instead of using container_of, reusing QEMUBHFunc (renamed to QEMUCallbackFunc maybe?) in QEMUNo

Re: [Qemu-devel] Re: [PATCH 1/7] Add support for generic notifier lists

2010-03-11 Thread Paolo Bonzini
On 03/11/2010 02:42 PM, Avi Kivity wrote: On 03/11/2010 03:25 PM, Paolo Bonzini wrote: I didn't understand the advantage of making QEMUNotifier a struct. Instead of using container_of, reusing QEMUBHFunc (renamed to QEMUCallbackFunc maybe?) in QEMUNotifierNode [...] seems cleaner. You would plac

[Qemu-devel] Re: [PATCH 1/7] Add support for generic notifier lists

2010-03-11 Thread Paolo Bonzini
On 03/11/2010 02:58 PM, Paul Brook wrote: 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 under

Re: [Qemu-devel] Re: [PATCH 1/7] Add support for generic notifier lists

2010-03-11 Thread Anthony Liguori
On 03/11/2010 07:25 AM, Paolo Bonzini wrote: 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 u

[Qemu-devel] Re: [PATCH 1/7] Add support for generic notifier lists

2010-03-11 Thread Paul Brook
> 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 a

Re: [Qemu-devel] Re: [PATCH 1/7] Add support for generic notifier lists

2010-03-11 Thread Avi Kivity
On 03/11/2010 03:25 PM, Paolo Bonzini wrote: 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 u

[Qemu-devel] Re: [PATCH 1/7] Add support for generic notifier lists

2010-03-11 Thread Paolo Bonzini
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