task_struct pid in for current task does not tally ..

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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();
}

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux