qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Wenchao Xia <wenchaoqemu@gmail.com>
To: qemu-devel@nongnu.org
Cc: mdroth@linux.vnet.ibm.com, armbru@redhat.com,
	Wenchao Xia <wenchaoqemu@gmail.com>,
	lcapitulino@redhat.com
Subject: [Qemu-devel] [RFC PATCH V3 0/5] add direct support of event in qapi schema
Date: Tue, 18 Mar 2014 22:16:36 -0700	[thread overview]
Message-ID: <1395206201-22999-1-git-send-email-wenchaoqemu@gmail.com> (raw)

This series add support for tag/keyword 'event' in qapi-schema.
A new file was created to store some helper functions in patch 2, patch 4 is
the test case, patch 5 is a convert example.

The implemention is done by generate API and a batch of parameters for each
event define, it doesn't generate a struture and visit function in the
background for every event, so it doesn't support nested structure in the
define to avoid trouble. A callback layer is added to control the behavior.
More detail can be found in patch 3's message and incode comments.

v2:
  Address Luiz's comments:
  patch 3: rename *err to *local_err, do not initialize *qmp = NULL, create
a new function qmp_build_evet_dict().
  Other change:
  reorgnized script in patch 3, it have a clear three steps, see patch 3's
incode comments.

v3:
  Address Luiz's comments:
  2/5: use -1 when fail to get host timestamp.
  3/5: typo fix and better incode comments. all unchanged functions are moved
into qmp-event.c, from generated file. To do so without include issue, 'int'
was used intead of 'enum' in function prototype declaration, since the 'enum'
define is a generated type.
  Address Eric's comments:
  2/5: use -1 when fail to get host timestamp.
  3/5: typo fix, add docs/qapi-code-gen.txt.
  4/5: typo fix, verify no other fields in member 'timestamp'.
  5/5: add doc in qapi-schema.json.
  fix license, all script using GPL2, all C code use LGPL, just as other
similar files in upstream.

Wenchao Xia (5):
  1 os-posix: include sys/time.h
  2 qapi: add event helper functions
  3 qapi script: add event support
  4 test: add test cases for qapi event
  5 qapi event: convert RTC_CHANGE

 Makefile                                |    9 +-
 Makefile.objs                           |    2 +-
 docs/qapi-code-gen.txt                  |   18 ++
 include/qapi/qmp-event.h                |   25 ++
 include/sysemu/os-posix.h               |    2 +
 monitor.c                               |   15 ++
 qapi-schema.json                        |   13 +
 qapi/Makefile.objs                      |    1 +
 qapi/qmp-event.c                        |   71 ++++++
 scripts/qapi-event.py                   |  373 +++++++++++++++++++++++++++++++
 tests/Makefile                          |   14 +-
 tests/qapi-schema/qapi-schema-test.json |   12 +
 tests/qapi-schema/qapi-schema-test.out  |   10 +-
 tests/test-qmp-event.c                  |  258 +++++++++++++++++++++
 vl.c                                    |    7 +-
 15 files changed, 816 insertions(+), 14 deletions(-)
 create mode 100644 include/qapi/qmp-event.h
 create mode 100644 qapi/qmp-event.c
 create mode 100644 scripts/qapi-event.py
 create mode 100644 tests/test-qmp-event.c

             reply	other threads:[~2014-03-19  5:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-19  5:16 Wenchao Xia [this message]
2014-03-19  5:16 ` [Qemu-devel] [RFC PATCH V3 1/5] os-posix: include sys/time.h Wenchao Xia
2014-03-19  5:16 ` [Qemu-devel] [RFC PATCH V3 2/5] qapi: add event helper functions Wenchao Xia
2014-03-20 22:53   ` Eric Blake
2014-03-24  0:53     ` Wenchao Xia
2014-03-24 13:11       ` Eric Blake
2014-03-19  5:16 ` [Qemu-devel] [RFC PATCH V3 3/5] qapi script: add event support Wenchao Xia
2014-03-20 23:06   ` Eric Blake
2014-03-24  0:59     ` Wenchao Xia
2014-03-19  5:16 ` [Qemu-devel] [RFC PATCH V3 4/5] test: add test cases for qapi event Wenchao Xia
2014-03-21  0:23   ` Eric Blake
2014-03-24  1:01     ` Wenchao Xia
2014-03-19  5:16 ` [Qemu-devel] [RFC PATCH V3 5/5] qapi event: convert RTC_CHANGE Wenchao Xia
2014-03-21  0:25   ` Eric Blake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1395206201-22999-1-git-send-email-wenchaoqemu@gmail.com \
    --to=wenchaoqemu@gmail.com \
    --cc=armbru@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).