On Thu, 2007-07-26 at 18:51 +0400, Pavel Emelyanov wrote: > > + * pid_nr() : global id, i.e. the id seen from the init namespace; > + * pid_vnr() : virtual id, i.e. the id seen from the namespace this pid > + * belongs to. this only makes sence when called in the > + * context of the task that belongs to the same namespace;
Can we give these some better names? I think "virtual" is pretty bad, especially if you consider the multiple level of pid namespaces that we might have some day. Processes can belong to multiple pid namespaces, and thus have multiple "virtual" ids. Even though it will make the names longer, I think we need something in the names to say that "pid_nr()" is the top-level, global, init_pid_ns number. "pid_vnr()" is the pid for the lowest pid namespace in the hierarchy. Suka called this an "active pid namespace" because that is where the task actively interacts with its peers. But, I'm open to other suggestions, too. When writing code, people are going to need to know which one to use: pid_nr() or pid_vnr(). We can document the functions, but the names will help much more than any documentation. -- Dave _______________________________________________ Devel mailing list Devel@openvz.org https://openvz.org/mailman/listinfo/devel