Re: [Qemu-devel] [PATCH 1/8] notifier: switch to QLIST

2012-01-03 Thread Stefan Hajnoczi
On Tue, Jan 3, 2012 at 11:59 AM, Paolo Bonzini wrote: > On 01/03/2012 12:54 PM, Stefan Hajnoczi wrote: >> >> On Mon, Jan 02, 2012 at 07:00:30PM +0100, Paolo Bonzini wrote: >>> >>>  void notifier_list_add(NotifierList *list, Notifier *notifier) >>>  { >>> -    QTAILQ_INSERT_HEAD(&list->notifiers, n

Re: [Qemu-devel] [PATCH 1/8] notifier: switch to QLIST

2012-01-03 Thread Paolo Bonzini
On 01/03/2012 12:54 PM, Stefan Hajnoczi wrote: On Mon, Jan 02, 2012 at 07:00:30PM +0100, Paolo Bonzini wrote: void notifier_list_add(NotifierList *list, Notifier *notifier) { -QTAILQ_INSERT_HEAD(&list->notifiers, notifier, node); +QLIST_INSERT_HEAD(&list->notifiers, notifier, node);

Re: [Qemu-devel] [PATCH 1/8] notifier: switch to QLIST

2012-01-03 Thread Stefan Hajnoczi
On Mon, Jan 02, 2012 at 07:00:30PM +0100, Paolo Bonzini wrote: > void notifier_list_add(NotifierList *list, Notifier *notifier) > { > -QTAILQ_INSERT_HEAD(&list->notifiers, notifier, node); > +QLIST_INSERT_HEAD(&list->notifiers, notifier, node); > } > > -void notifier_list_remove(Notifi

[Qemu-devel] [PATCH 1/8] notifier: switch to QLIST

2012-01-02 Thread Paolo Bonzini
Notifiers do not need to access both ends of the list, and using a QLIST also simplifies the API. Signed-off-by: Paolo Bonzini --- I do plan to exploit the simplified API in a future patch... input.c |2 +- migration.c |2 +- notify.c | 10 +- notify.h |