[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 11/22] qapi: add signal support to core QMP serv

From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 11/22] qapi: add signal support to core QMP server
Date: Mon, 07 Mar 2011 07:53:40 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20101027 Lightning/1.0b1 Thunderbird/3.0.10

On 03/07/2011 07:21 AM, Stefan Hajnoczi wrote:
On Mon, Mar 7, 2011 at 1:22 AM, Anthony Liguori<address@hidden>  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;
  typedef void (QmpCommandFunc)(const QDict *, QObject **, Error **);
  typedef void (QmpStatefulCommandFunc)(QmpState *qmp__sess, const QDict *, 
QObject **, Error **);

+typedef struct QmpSlot
+    int handle;
+    void *func;
This should be a void (*func)()

Technically void (*)() is an obsolete type in standard C.

I can switch to void (*)(void) but it requires casting and requires a typeof() :-/


Anthony Liguori

  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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]