[RFC][PATCH] rename 'struct pid'
dev at sw.ru
Wed Apr 11 09:25:03 PDT 2007
Dave Hansen wrote:
> On Wed, 2007-04-11 at 11:59 +0400, Kirill Korotaev wrote:
>>Dave, taskref sounds a bit too much generic for me...
> I completely agree. It's a pretty generic name. In the kernel, though
> it does provide lookups to tasks. I think the in-kernel task vs.
> process naming means that it is more consistent if we use something with
> "task" in it. It may be called a "process identifier" in userspace but,
> in the kernel, it appears to deal squarely with tasks.
>>But I can't provide some better name :/
>>pid - number
>>pref (or tref) - process (task) ref, e.g. pid(filp->f_owner.pref)
>>pref_struct - former pid_struct, e.g. struct pref_struct pref;
> Not bad. But, it would be nice to get away from pid-like names. Part
> of the problem with things like 'struct pid_struct' is that the
> structure name is nice, but people will still do:
> struct pid_struct pid;
> And we're back to square one. :(
exactly! that's why I propose to call it pref_struct and do:
struct pref_struct pref;
i.e. to remove word "pid" from any code which is not dealing with
pid(pref) macro on the other hand returns numeric identifier.
More information about the Containers