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

Cyrill Gorcunov gorcunov at openvz.org
Thu Dec 13 01:53:33 EST 2012


On Thu, Dec 13, 2012 at 10:39:45AM +0400, Alexander Kartashov wrote:
>    On 12/12/2012 07:51 PM, Cyrill Gorcunov wrote:
> 
>  An overall note on the file names -- it's ugly, when a file name is arch/xxx/arch-yyy.h.
>  > Please, rework the arch-dependent headers model the way it looks in the Linux kernel.
>  >
>  > I.e.
>  > - files look like arch/<arch>/include/asm/<file>.h
>  > - everyone who need arch-specific header does #include <asm/<file>.h>
>  > - the -I arch/<arch/include/ option is added by builder
> 
>  Yes, I was about to propose the same. Everything arch-dependant should go
>  to arch/x86/include and/or arch/arm/include.
> 
>  Is the proposal adopted? If not I'd like to hear your comments about the
>  following proposal:
>  I'd like to introduce intermediate include folder into arch/<arch>/include/cr
>  in order to avoid collisions between arch-dependent, arch-independent and
>  system headers: some arch-dependent headers (eg. atomic.h, types.h) have very
>  generic name and they collide with system header names.

Wait, why could we have a collision here? Lets imagine we've moved bitops.h
to arch/xxx/include, thus we still be accessible it via plain

#include "bitops.h"

as to "#include <asm/<file>.h>" Pavel mentioned -- I think we must not
use global namespace hare but include header as local one, it

#include "asm/<file.h>"

since otherwise we indeed migh have collision with system-wide headers.

	Cyrill


More information about the CRIU mailing list