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

task_struct pid in for current task does not tally ..



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
basithsalman mindspring com
main()
{
    ...
   pthread_create(tid, myfunc, ..);
}
 
myfunc()
{
    getpid();
}

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