[Devel] Re: [RFC][v5][PATCH 8/8]: Define clone_with_pids() syscall
Linus Torvalds
torvalds at linux-foundation.org
Wed Sep 9 11:34:22 PDT 2009
On Wed, 9 Sep 2009, Sukadev Bhattiprolu wrote:
>
> BTW, would it work if we defined
>
> struct pid_set {
> u64 pids;
> int num_pids;
> }
>
> where ->pids can be still be a pointer ? The data structure would
> have the same size on all architectures.
I don't think that's all that great. Just go with the C90 version, we
already have that thing in the kernel, and
struct pid_set {
int num_pids;
pid_t pids[];
};
looks simple and straightforward. And it even makes your example simpler,
doesn't it? Ie now it's just
struct pid_set pids = { 3, { 0, 97, 99 } };
and gcc should do the right thing.
(Of course, in any real case it would be dynamically allocated, but
whatever).
Linus
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list