I developed a process with some threads on a Linux machine (Ubuntu). I'd like to know how can i get LWP from each thread (using a glibc function), once the PID and PPID are always the same for all the threads of the process.
UID PID PPID LWP C NLWP STIME TTY TIME CMD
root 2588 2587 2588 0 11 00:05 ? 00:00:07 ./testsrv
root 2588 2587 2589 2 11 00:05 ? 00:23:17 ./testsrv
root 2588 2587 2590 0 11 00:05 ? 00:00:00 ./testsrv
root 2588 2587 2591 0 11 00:05 ? 00:00:03 ./testsrv
root 2588 2587 2592 0 11 00:05 ? 00:00:00 ./testsrv
root 2588 2587 2593 0 11 00:05 ? 00:00:00 ./testsrv
root 2588 2587 2594 0 11 00:05 ? 00:05:05 ./testsrv
root 2588 2587 2595 0 11 00:05 ? 00:00:00 ./testsrv
root 2588 2587 2596 0 11 00:05 ? 00:00:37 ./testsrv
root 2588 2587 2597 0 11 00:05 ? 00:00:00 ./testsrv
root 2588 2587 2601 0 11 00:05 ? 00:00:00 ./testsrv