[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 9 Sep 2009 11:34:22 -0700 (PDT)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>
cc: "H. Peter Anvin" <hpa@...or.com>, Arnd Bergmann <arnd@...db.de>,
Nathan Lynch <ntl@...ox.com>, linux-kernel@...r.kernel.org,
Containers <containers@...ts.linux-foundation.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>, mingo@...e.hu,
Alexey Dobriyan <adobriyan@...il.com>,
Pavel Emelyanov <xemul@...nvz.org>
Subject: Re: [RFC][v5][PATCH 8/8]: Define clone_with_pids() syscall
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists