>Hi, > How can I get one thread’s LWP id on linux? > The thread is not the main thread, so that getpid() does not work. >And the LWP id is not the same as the result by pthread_self(). > > Any suggestion? gettid(), I assume. Jan Engelhardt --