qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 3/4] Refactoring MonitorDef array


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 3/4] Refactoring MonitorDef array
Date: Tue, 01 Oct 2013 08:13:24 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8

On 10/01/2013 07:28 AM, Fabien Chouteau wrote:
> On 10/01/2013 04:00 AM, Richard Henderson wrote:
>> On 09/30/2013 08:57 AM, Fabien Chouteau wrote:
>>> +extern const MonitorDef arch_monitor_defs[];
>>
>> This is supplied by target-foo/monitor.c, right?
>> Why in the world is it declared in generic code?
>>
> 
> Yes, why?
> 
>> Especially if it's only ever accessed via the
>> cpu->monitor_defs member?
>>
> 
> To begin with, I though I'd put in in each target-*/cpu.c, then having
> it at only one place seemed more clean. I'm open to any suggestion.
> 

If you put it in a global header like that, it looks like the array is
part of the generic interface.  But it isn't -- only the monitor_defs
member is.

If it's declared in any header at all, as opposed to static and local
to cpu.c (why was a new monitor.c file chosen?), it should go into
target-foo/cpu.h, where most of the other cpu-specific declarations go.


r~



reply via email to

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