I like that all the arch-specific code is under sys/arch, and not randomly
spread around tree, i.e. I prefer to keep the compat things under sys/arch.

For sure, same argument could be used the opposite direction, that it would
be neater to have all the compat code together.

But IMO the arch-specific bits are more tied to the specific platform, so
it makes sense to have them together with their native counterparts - like
e.g. signal trampoline code.

Jaromir

2017-08-01 13:12 GMT+02:00 Maxime Villard <m...@m00nbsd.net>:
> Yes, that's the right thing to do.
>
> I haven't rechecked, but as far as I remember, there will be some issues
with
> the compat layers that have several #ifdefs deep into the machdep code.
>
> Apart from that, several files could usefully be moved into the
appropriate
> compat_xyz directory, instead of polluting sys/arch/. For example:
>
>         sys/arch/amd64/amd64/linux_*    ->   sys/compat/linux/arch/amd64/
>         sys/arch/amd64/amd64/linux32_*  ->
sys/compat/linux32/arch/amd64/
>
> This would provide a better encapsulation.

Reply via email to