This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2 10/15] RISC-V: Linux Syscall Interface


On Mon, Jan 01, 2018 at 12:56:14AM +0000, Joseph Myers wrote:
> such case, whether a copy from another architecture or a #include from 
> another architecture, indicates a case where refactoring is needed to 
> avoid such duplication - if the code can be generic for all new ports it 
> should be in a generic location, while if it's generic for ports with a 
> particular property things should be factored so a port only needs to 
> declare that it has that property.  (Of course such refactoring is risky 
> so not typically appropriate during a release freeze.)
> 
> Often, the files for i386 are actually generic for *old* ports and so if 
> you're copying or including such a file (or one from another old 
> architecture) you need to be particularly careful that it actually 
> represents the desired way to do things now, rather than compatibility 
> with old ABIs or old versions of the syscall interface.

clone is a hodegepodge, but the clone(2) manpage documents it well.
There are two major camps, and risv implements on of those.  And then
there are various oddballs.

So for now it might make sense to just duplicate the i386 file for
riscv, or follow the example of various forks to include it.  In the
long run having a generic implementation for the two common versions
might be useful.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]