title: How to get thread id of a pthread in linux c program?
body: <p>In a Linux C program, how do I print the thread id of a thread created by the pthread library? For example like how we can get pid of a process by <code>getpid()</code>.</p>