Hi, Thanks for your reply.
But I still confuse about the usage. Is anybody could give me some more detailed information? Thank you very much~ On Tue, Jul 20, 2010 at 11:24 AM, Tushar Dadlani <[email protected]> wrote: > > Hi, > > struct pid is a drop in replacement for a > pid_t (except for the need for reference counting. > > Found this here http://lwn.net/Articles/257054/ > > On Tue, Jul 20, 2010 at 8:26 AM, Aiolia Lea <[email protected]> wrote: > >> Hi, All >> >> From linux kernel (2.6.30.4), I found two data structures, as follow: >> >> typedef __kernel_pid_t pid_t; >> >> struct pid >> { >> atomic_t count; >> unsigned int level; >> /* lists of tasks that use this pid */ >> struct hlist_head tasks[PIDTYPE_MAX]; >> struct rcu_head rcu; >> struct upid numbers[1]; >> }; >> >> According to my understanding, the pid_t is the frequent item we know, >> such as in getpid() function, ps command and also. >> >> Then, what's the pid structure used for? and what's the relationship >> between pid structure and pid_t? >> >> Why the kernel required to involved pid this structure? >> >> Hope you could give me some explanation or some links. >> >> Thank you very much~ >> -- >> Best Regards! >> Aiolia Lea >> > > > > -- > Tushar Dadlani > Manipal Institute of Technology > +919986292434 > -- Best Regards! Aiolia Lea
