[CRIU] [PATCH 01/20] x86: moved x86-specific files into the directory arch/x86.

Pavel Emelyanov xemul at parallels.com
Wed Dec 19 09:46:54 EST 2012


On 12/19/2012 06:42 PM, Alexander Kartashov wrote:
> On 12/19/2012 06:35 PM, Pavel Emelyanov wrote:
>> On 12/19/2012 06:15 PM, Alexander Kartashov wrote:
>>> On 12/13/2012 10:53 AM, Cyrill Gorcunov wrote:
>>>> as to "#include <asm/<file>.h>" Pavel mentioned -- I think we must not
>>>> use global namespace hare but include header as local one, it
>>> What do you think about the following proposition:
>>>
>>> * if the whole header is moved to arch/ then let it be accessible
>>>      in the global namespace (eg, linkage.h, atomic.h);
>>> * it a header is split then let it be accessible in the namespace cr/.
>> It's inconvenient. We will have a lot of headers looking like
>>
>> include/foo.h:
>>    #include "asm/foo.h"
>>    /* arch independent foo stuff */
>>
>> arch/<arch>/include/asm/foo.h
>>    /* arch dependent foo stuff
>>
>> and in .c files we will include mostly the "foo.h"-s instead of "asm/foo.h"-s
>>
>>
> 
> Yes, however, what's wrong with this?
> 
> Is it better to move the whole header into arch/$(ARCH)/include?

Yes.

> I'm afraid this will result in a lot of duplicated code.

Why? I don't propose to create include/x.h for every header moved to arch/.
Just keep arch-specific headers in arch/<arch>/include/asm/, not arch/<arch>/.

Thanks,
Pavel


More information about the CRIU mailing list