OpenVZ Forum


Home » Mailing lists » Devel » [RFC][PATCH] rename 'struct pid'
Re: [RFC][PATCH] rename 'struct pid' [message #18180 is a reply to message #18159] Wed, 11 April 2007 16:25 Go to previous messageGo to previous message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

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 
numbers.
pid(pref) macro on the other hand returns numeric identifier.

Thanks,
Kirill

_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IPC NS tests ?
Next Topic: [RFC | PATCH 0/9] CPU controller over process container
Goto Forum:
  


Current Time: Mon Sep 15 09:09:10 GMT 2025

Total time taken to generate the page: 0.47974 seconds