[Devel] Re: [RFC][v8][PATCH 10/10]: Document clone3() syscall
Arnd Bergmann
arndbergmann at googlemail.com
Wed Oct 21 06:32:14 PDT 2009
On Wednesday 21 October 2009, Pavel Machek wrote:
> > > Hmm, is there reason why pids are not at the end of struct
> > > clone_struct? Passing most parameters in special structure, then pids
> > > separately is strange...
> >
> > I suggested doing that, it's a lot easier to handle fixed length data
> > structures than an array at the end.
>
> You could still put the something * pids at the end of (fixed length)
> structure.
>
> (Not that I agree with the argument, pid array is variable-length,
> anyway, and inlining it at the end of structure should not make code
> more complex).
Please read up on the v1 to v7 patches, we've been through all this
before. There are obviously a lot of ways to do it, many of which are
equally good. The important thing to note is that the user-visible
interface should *not* pass the structure into the library that provides
this function but build the structure itself, so it doesn't matter that
much.
If you put the array at the end of the data structure, the wrapper
will have to copy the array provided by the user to a temporary
buffer. Passing the array as a separate syscall argument avoids
this.
Arnd <><
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list