From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=45977 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PwaND-0001HX-4x for qemu-devel@nongnu.org; Mon, 07 Mar 2011 08:21:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PwaNB-0003h4-VU for qemu-devel@nongnu.org; Mon, 07 Mar 2011 08:21:19 -0500 Received: from mail-yx0-f173.google.com ([209.85.213.173]:62797) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PwaNB-0003gx-Sw for qemu-devel@nongnu.org; Mon, 07 Mar 2011 08:21:17 -0500 Received: by yxk8 with SMTP id 8so2009711yxk.4 for ; Mon, 07 Mar 2011 05:21:17 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1299460984-15849-12-git-send-email-aliguori@us.ibm.com> References: <1299460984-15849-1-git-send-email-aliguori@us.ibm.com> <1299460984-15849-12-git-send-email-aliguori@us.ibm.com> Date: Mon, 7 Mar 2011 13:21:17 +0000 Message-ID: Subject: Re: [Qemu-devel] [PATCH 11/22] qapi: add signal support to core QMP server From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Markus Armbruster , Luiz Capitulino , qemu-devel@nongnu.org, Adam Litke On Mon, Mar 7, 2011 at 1:22 AM, Anthony Liguori wrote= : > diff --git a/qmp-core.h b/qmp-core.h > index e3235ec..5ce02f7 100644 > --- a/qmp-core.h > +++ b/qmp-core.h > @@ -21,10 +21,65 @@ typedef struct QmpState QmpState; > =A0typedef void (QmpCommandFunc)(const QDict *, QObject **, Error **); > =A0typedef void (QmpStatefulCommandFunc)(QmpState *qmp__sess, const QDict= *, QObject **, Error **); > > +typedef struct QmpSlot > +{ > + =A0 =A0int handle; > + =A0 =A0void *func; This should be a void (*func)() pointer for architectures where function pointers don't fit into void * (e.g. ppc and itanium). > +QmpSignal *qmp_signal_init(void); > +void qmp_signal_ref(QmpSignal *obj); > +void qmp_signal_unref(QmpSignal *obj); > +int qmp_signal_connect(QmpSignal *obj, void *func, void *opaque); Same function pointer issue here. Stefan