Feb. 8, 2012
7:54 a.m.
Hello All, I am writing a kernel module and I wanted to know which data structure backs up the /proc/self or how do I get the process id of my call and number of it's threads from within the kernel? Thanks, Suren.
Feb. 8, 2012
8:31 a.m.
Hello Surenkumar, On Wed, Feb 8, 2012 at 8:54 AM, Surenkumar Nihalani <suren@gatech.edu> wrote:
Hello All,
I am writing a kernel module and I wanted to know which data structure backs up the /proc/self or how do I get the process id of my call and number of it's threads from within the kernel?
You can get the process id of the current context using the directive "current->pid". The macro "current" refers to the current task struct, so it should also be possible to get the number of threads. Philipp
5302
Age (days ago)
5302
Last active (days ago)
1 comments
2 participants
participants (2)
-
Philipp Ittershagen -
Surenkumar Nihalani