[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] Add infrastructure for QIDL-based device ser
From: |
Michael Roth |
Subject: |
Re: [Qemu-devel] [PATCH v2] Add infrastructure for QIDL-based device serialization |
Date: |
Fri, 21 Sep 2012 11:24:28 -0500 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri, Sep 21, 2012 at 05:57:42PM +0200, Paolo Bonzini wrote:
> Il 21/09/2012 16:07, Michael Roth ha scritto:
> >
> > QIDL_DECLARE(SerialDevice) {
> > SysBusDevice parent;
> >
> > uint8_t thr; /* transmit holding register */
> > uint8_t lsr; /* line status register */
> > uint8_t ier; /* interrupt enable register */
> >
> > int int_pending qDerived; /* whether we have a pending queued
> > interrupt */
> > CharDriverState *chr qImmutable; /* backend */
> > };
>
> I thought we agreed on QIDL(derived), QIDL(immutable) etc. These
> prefixes just do not scale...
qImmutable gets defined as QIDL(immutable) via qidl.h, and underneath
the covers it's all QIDL(). So we can change them easily if need be, and
still have the optional of using QIDL() for any current or new
annotations that get introduced. But QIDL() just ends up being
really noisey in practice, especially when a field has multiple
annotations, so I'd like to make that kind of usage the exceptional
case rather than the common one.
I went with qUppercase because it avoids all the previous issues with
using leading underscores, and it's reserved in terms of QEMU coding
guidelines as far as I can tell (we generally require leading capital
for typedefs and lowercase for variable names, and can work around
exceptions on a case by case basis by using QIDL() or some other name).
I also had it as q_* for a bit but that didn't seem much better on the
eyes we looking at converted structures.
>
> Paolo
>
- [Qemu-devel] [PATCH 20/22] qidl: add QAPI-based code generator, (continued)
- [Qemu-devel] [PATCH 20/22] qidl: add QAPI-based code generator, Michael Roth, 2012/09/21
- [Qemu-devel] [PATCH 22/22] qidl: unit tests and build infrastructure, Michael Roth, 2012/09/21
- [Qemu-devel] [PATCH 21/22] qidl: qidl.h, definitions for qidl annotations, Michael Roth, 2012/09/21
- [Qemu-devel] [PATCH 19/22] qidl: add C parser (based on QC parser), Michael Roth, 2012/09/21
- [Qemu-devel] [PATCH 18/22] qidl: add lexer library (based on QC parser), Michael Roth, 2012/09/21
- Re: [Qemu-devel] [PATCH v2] Add infrastructure for QIDL-based device serialization, Paolo Bonzini, 2012/09/21
- Re: [Qemu-devel] [PATCH v2] Add infrastructure for QIDL-based device serialization,
Michael Roth <=
- Re: [Qemu-devel] [PATCH v2] Add infrastructure for QIDL-based device serialization, Blue Swirl, 2012/09/22
- Re: [Qemu-devel] [PATCH v2] Add infrastructure for QIDL-based device serialization, Michael Roth, 2012/09/24
- Re: [Qemu-devel] [PATCH v2] Add infrastructure for QIDL-based device serialization, Paolo Bonzini, 2012/09/25
- Re: [Qemu-devel] [PATCH v2] Add infrastructure for QIDL-based device serialization, Michael Roth, 2012/09/25
- Re: [Qemu-devel] [PATCH v2] Add infrastructure for QIDL-based device serialization, Anthony Liguori, 2012/09/25
- Re: [Qemu-devel] [PATCH v2] Add infrastructure for QIDL-based device serialization, Paolo Bonzini, 2012/09/26
- Re: [Qemu-devel] [PATCH v2] Add infrastructure for QIDL-based device serialization, Kevin Wolf, 2012/09/26
- Re: [Qemu-devel] [PATCH v2] Add infrastructure for QIDL-based device serialization, Paolo Bonzini, 2012/09/26
- Re: [Qemu-devel] [PATCH v2] Add infrastructure for QIDL-based device serialization, Michael Roth, 2012/09/26
[Qemu-devel] [PATCH 16/22] qdev: move Property-related declarations to qdev-properties.h, Michael Roth, 2012/09/21