[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 12/29] Include hw/irq.h a lot less
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH v2 12/29] Include hw/irq.h a lot less |
Date: |
Thu, 08 Aug 2019 06:27:16 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) |
Eric Blake <address@hidden> writes:
> On 8/7/19 8:04 AM, Philippe Mathieu-Daudé wrote:
>> On 8/6/19 5:14 PM, Markus Armbruster wrote:
>>> In my "build everything" tree, changing hw/irq.h triggers a recompile
>>> of some 5400 out of 6600 objects (not counting tests and objects that
>>> don't depend on qemu/osdep.h).
>>>
>>> hw/hw.h supposedly includes it for convenience. Several other headers
>>> include it just to get qemu_irq and.or qemu_irq_handler.
>>>
>>> Move the qemu_irq and qemu_irq_handler typedefs from hw/irq.h to
>>> qemu/typedefs.h, and then include hw/irq.h only where it's still
>>> needed. Touching it now recompiles only some 500 objects.
>>>
>
>>> /*
>>> * Function types
>>> */
>>> typedef void SaveStateHandler(QEMUFile *f, void *opaque);
>>> typedef int LoadStateHandler(QEMUFile *f, void *opaque, int version_id);
>>> +typedef void (*qemu_irq_handler)(void *opaque, int n, int level);
>
> Should we prefer a consistent form for function pointer typedefs? Here,
> we've mixed 'rettype Name(params)' with 'rettype (*name)(params)'.
Which of the two difference I can see do you mean?
CamelCase vs. lower_case_with_underscore?
Parenthesis around the type name? I wouldn't call that inconsistent, we
simply use parenthesis only when needed.
- Re: [Qemu-devel] Is network backend netmap worth keeping? (was: [PATCH v2 27/29] Include sysemu/sysemu.h a lot less), (continued)
- Re: [Qemu-devel] Is network backend netmap worth keeping? (was: [PATCH v2 27/29] Include sysemu/sysemu.h a lot less), Stefano Garzarella, 2019/08/08
- Re: [Qemu-devel] Is network backend netmap worth keeping?, Giuseppe Lettieri, 2019/08/08
- Re: [Qemu-devel] Is network backend netmap worth keeping?, Markus Armbruster, 2019/08/08
- Re: [Qemu-devel] Is network backend netmap worth keeping?, Philippe Mathieu-Daudé, 2019/08/12
- Re: [Qemu-devel] Is network backend netmap worth keeping?, Philippe Mathieu-Daudé, 2019/08/12
[Qemu-devel] [PATCH v2 19/29] Include qemu/queue.h slightly less, Markus Armbruster, 2019/08/06
[Qemu-devel] [PATCH v2 12/29] Include hw/irq.h a lot less, Markus Armbruster, 2019/08/06
[Qemu-devel] [PATCH v2 29/29] sysemu: Split sysemu/runstate.h off sysemu/sysemu.h, Markus Armbruster, 2019/08/06
[Qemu-devel] [PATCH v2 15/29] Include migration/vmstate.h less, Markus Armbruster, 2019/08/06
[Qemu-devel] [PATCH v2 18/29] Include hw/hw.h exactly where needed, Markus Armbruster, 2019/08/06
[Qemu-devel] [PATCH v2 21/29] Include hw/qdev-properties.h less, Markus Armbruster, 2019/08/06