Hi All,
The current->pid of the task_struct does not
tall with the getpid()
for pthread_create() call.
For ex. below the getpid() in myfunc() does not
tally with the
pid in the current task_struct for linux redhat
9.
It is one more that the in thread
func.
ex. if getpid() below return 100 than the
current->pid of the
task_struct (sched.) has a value of
101.
If this is the case than how do I get the actual
thread
pid from the task_struc in ther
kernel.
TIA
main()
{
...
pthread_create(tid, myfunc,
..);
} myfunc()
{
getpid();
}
|