lkml.org 
[lkml]   [2006]   [Aug]   [16]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
From(Eric W. Biederman)
SubjectRe: [Containers] [PATCH 2/7] pid: Add do_each_pid_task
DateWed, 16 Aug 2006 00:15:04 -0600
Andrew Morton <akpm@osdl.org> writes:

> On Tue, 15 Aug 2006 22:10:43 -0500
> "Serge E. Hallyn" <serue@us.ibm.com> wrote:
>
>> Quoting Eric W. Biederman (ebiederm@xmission.com):
>> > To avoid pid rollover confusion the kernel needs to work with
>> > struct pid * instead of pid_t.  Currently there is not an iterator
>> > that walks through all of the tasks of a given pid type starting
>> > with a struct pid.  This prevents us replacing some pid_t instances
>> > with struct pid.  So this patch adds do_each_pid_task which walks
>> > through the set of task for a given pid type starting with a struct pid.
>> > 
>> > Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
>> > ---
>> >  include/linux/pid.h |   13 +++++++++++++
>> >  1 files changed, 13 insertions(+), 0 deletions(-)
>> > 
>> > diff --git a/include/linux/pid.h b/include/linux/pid.h
>> > index 93da7e2..4007114 100644
>> > --- a/include/linux/pid.h
>> > +++ b/include/linux/pid.h
>> > @@ -118,4 +118,17 @@ #define while_each_task_pid(who, type, t
>> >  				1; }) );				\
>> >  	}
>> > 
>> > +#define do_each_pid_task(pid, type, task)				\
>> 
>> Hmm, defining do_each_pid_task right after do_each_task_pid could result
>> in some frustration  :)
>
> That's all right - developers can read the comments to work out what each
> one does.
>
> <seems I'm having a sarcastic day>

The plan is to that having both of them in the same kernel should
be a short lived thing.  There are few enough of these perhaps I should
just replace all of them at once.

Doing this gradually and reviewably seems to require that I have
both versions of the API simultaneously.  The core problem here
is that there aren't many good names.

Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-08-16 08:17    [from the cache]
©2003-2008