From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NpiZJ-0004Ii-S0 for qemu-devel@nongnu.org; Thu, 11 Mar 2010 08:36:53 -0500 Received: from [199.232.76.173] (port=57565 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NpiZJ-0004IC-4d for qemu-devel@nongnu.org; Thu, 11 Mar 2010 08:36:53 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NpiZI-0001Cg-Gn for qemu-devel@nongnu.org; Thu, 11 Mar 2010 08:36:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36996) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NpiZI-0001Ca-2z for qemu-devel@nongnu.org; Thu, 11 Mar 2010 08:36:52 -0500 Message-ID: <4B98F1F0.7040105@redhat.com> Date: Thu, 11 Mar 2010 15:36:48 +0200 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 1/7] Add support for generic notifier lists References: <1268239869-16058-1-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1268239869-16058-1-git-send-email-aliguori@us.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Luiz Capitulino , qemu-devel@nongnu.org, Gerd Hoffman On 03/10/2010 06:51 PM, Anthony Liguori wrote: > + > +#ifndef QEMU_NOTIFY_H > +#define QEMU_NOTIFY_H > + > +#include "qemu-queue.h" > + > +typedef struct QEMUNotifier QEMUNotifier; > +typedef struct QEMUNotifierNode QEMUNotifierNode; > + > +struct QEMUNotifier > +{ > + void (*notify)(QEMUNotifier *notifier); > +}; > + > +struct QEMUNotifierNode > +{ > + QEMUNotifier *notifier; > + QTAILQ_ENTRY(QEMUNotifierNode) node; > +}; > + > +typedef struct QEMUNotifierList > +{ > + QTAILQ_HEAD(, QEMUNotifierNode) notifiers; > +} QEMUNotifierList; > + > +#define QEMU_NOTIFIER_LIST_INITIALIZER(head) \ > + { QTAILQ_HEAD_INITIALIZER((head).notifiers) } > + > +void qemu_notifier_list_init(QEMUNotifierList *list); > + > +void qemu_notifier_list_add(QEMUNotifierList *list, QEMUNotifier *notifier); > + > +void qemu_notifier_list_remove(QEMUNotifierList *list, QEMUNotifier *notifier); > + > +void qemu_notifier_list_notify(QEMUNotifierList *list); > + > Why the qemu_ prefixes everywhere? They make sense when wrapping library calls, but in native qemu code they're just noise. -- error compiling committee.c: too many arguments to function