Linux Kernel and Device Drivers

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Tue Jul 16 10:44:46 EDT 2013


On Tue, 16 Jul 2013 12:42:37 +0530, Satya Prakash Prasad said:
> I am not sure how to practice the code snippet given in the text book. I
> can understand the theory but do not find a way to practice. For example: I
> want to read a process 'struct task_struct' to find it parent's process
> identifier, how many tasks are in which state, creating kernel threads etc?

cd /usr/src/linux
find include -type f | xargs grep 'struct task_struct' | more

Lots of hits.  One of those is the definition of the structure. Study it
and learn from that.  The rest are where other things refer to the
structure - much can be learned from studying what *else* refers to it
and why.

Enjoy.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130716/89b712fb/attachment.bin 


More information about the Kernelnewbies mailing list