qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH RFC 4/5] include: Move typedef qemu_irq to qemu/


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH RFC 4/5] include: Move typedef qemu_irq to qemu/typedefs.h
Date: Fri, 24 Jun 2016 09:15:08 +0100

On 24 June 2016 at 09:12, Markus Armbruster <address@hidden> wrote:
> Peter Maydell <address@hidden> writes:
>
>> On 23 June 2016 at 17:12, Markus Armbruster <address@hidden> wrote:
>>> Signed-off-by: Markus Armbruster <address@hidden>
>>> ---
>>>  include/hw/irq.h        | 2 --
>>>  include/qemu/typedefs.h | 1 +
>>>  tests/Makefile.include  | 2 --
>>>  3 files changed, 1 insertion(+), 4 deletions(-)
>>>
>>> diff --git a/include/hw/irq.h b/include/hw/irq.h
>>> index 4c4c2ea..6a89571 100644
>>> --- a/include/hw/irq.h
>>> +++ b/include/hw/irq.h
>>> @@ -5,8 +5,6 @@
>>>
>>>  #define TYPE_IRQ "irq"
>>>
>>> -typedef struct IRQState *qemu_irq;
>>> -
>>>  typedef void (*qemu_irq_handler)(void *opaque, int n, int level);
>>>
>>>  void qemu_set_irq(qemu_irq irq, int level);
>>> diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
>>> index f9745c4..f7c27a9 100644
>>> --- a/include/qemu/typedefs.h
>>> +++ b/include/qemu/typedefs.h
>>> @@ -31,6 +31,7 @@ typedef struct FWCfgState FWCfgState;
>>>  typedef struct HCIInfo HCIInfo;
>>>  typedef struct I2CBus I2CBus;
>>>  typedef struct I2SCodec I2SCodec;
>>> +typedef struct IRQState *qemu_irq;
>>>  typedef struct ISABus ISABus;
>>>  typedef struct ISADevice ISADevice;
>>>  typedef struct IsaDma IsaDma;
>>
>> Everything else in typedefs.h is a "typedef struct Thing Thing",
>> but qemu_irq is different...
>
> We want to keep our readers on their toes!

It would mean you now have to decide whether the file is orderd
by the types being defined or by the underlying implementation
type (previously both orders were the same)...

thanks
-- PMM



reply via email to

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