Searched, but don't come across a satisfying answer.
I know there's no a portable way to print a pthread_t.
How do you do it in your app?
Update:
Actually I don't need pthread_t, but some small numeric id, identifying in debug message different threads.
On my system (64 bit RHEL 5.3) it's defined as unsigned long int, so it's big number and just printing it eats a valuable place in debug line. How does gdb assign short tids?
See Question&Answers more detail:os