[Devel] Re: [RFC][PATCH] rename 'struct pid'
Eric W. Biederman
ebiederm at xmission.com
Wed Apr 11 13:54:50 PDT 2007
Dave Hansen <hansendc at us.ibm.com> writes:
> On Wed, 2007-04-11 at 12:46 -0600, Eric W. Biederman wrote:
>>
>> > These can be a bit confusing:
>> >
>> > struct pid *pid;
>> > struct pid *pgrp;
>> > struct pid *sid;
>>
>> How is it more confusing then?
>>
>> pid_t pid;
>> pid_t pgrp;
>> pid_t sid;
>
> They confuse me the same way. :)
>
> We can't do much about userspace. But, we do have quite a bit of
> control how we name things in the kernel, and I think there's a better
> way.
Maybe.
The worst of those above is:
pid_t pid;
Am I correct?
When someone mentions a pid which side of the above statement are you
thinking of the left hand side or the right hand side. The type or
the variable name.
If you think of the variable name, I contend pids are very confusing.
If you think of the type it is less so.
Did that make sense?
> Eric, we all know that you understand this stuff. I'm just trying to
> make it a bit more approachable for anyone that comes along in the
> future. Serge, Suka, Kirill and Pavel have all expressed some level of
> dissatisfaction, and I think we all agree that 'struct pid' is at the
> heart of the issue. That's a pretty large chunk of the people other
> than you that have tried to hack on it so far.
I haven't heard it universally said that 'struct pid' is at the heart
of the issue.
> I honestly don't think changing peripheral names is going to cut it,
> especially as the largest amount of confusion comes in the core code
> which doesn't use as many of the functions which could get new
> names.
Maybe. I guess it depends on what issue you are trying to solve.
If the issue is a flood of the word pid lots of little things can help.
If the issue is that you find the concept of pid_t confusing then it
is much harder to sort this out.
> What would you think about running the _concept_ by Linus and akpm and
> seeing if they have any insights?
They aren't likely to step in, if there is a reasonable chance we can
resolve this ourselves.
Eric
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list