svn commit: r331226 - in head/sys: amd64/linux amd64/linux32 i386/linux

Ed Maste emaste at freebsd.org
Tue Mar 20 16:41:50 UTC 2018


On 20 March 2018 at 04:19, Bruce Evans <brde at optusnet.com.au> wrote:
>
> It is preferable to have a well-chosen (short...) prefix.  The linux
> emulator mostly uses l_ for internal names.  That is a bit too short
> for external names.

l_ is too short. The only reasonable alternative is probably lnx_ but
saving two characters seems does not seem worth it.

> 'elf_' is an example of a well-chosen prefix.

Not for Linux-specific things.

There are currently three copies of these functions, and I'm going to
move them so they can be shared by the Linuxulator on all appropriate
archs.

> I don't like the style of putting the verb last in names, but it goes well
> with putting prefixes first.  Here the verb placement style is random --
> the verb is last in ...handler_set and ...elf_fixup, but not last in
> ...copyout_strings.

These names are consistent with the sysentvec names.
sv_copyout_strings = linux_strings_copyout seems confusing for no real
benefit.

> Names without any prefix are likely to have had the verb first, and now
> in the middle.

It should probably not be plural either. This could be
linux_trap_translate instead.


More information about the svn-src-head mailing list