Pthread library provides the call pthread_self to get task id but this id is not the same as linux provided thread id, Linux view all the threads as LWP(light weight process) and identify using thread id, to get the linux thread id we need to use syscall system call, glibc doesn't provide the gettid function, so we define our own.
pid_t gettid (void)
{
return syscall(__NR_gettid);
}
I appreciate your efforts. really nice article !
ReplyDeletePhp projects with source code
Online examination system in php
Student management system in php
Php projects for students
Free source code for academic
Academic projects provider in nashik
Academic project free download
Very enthusiastic article, add so much useful information to me.essay rewriter birmingham
ReplyDelete