Right now I'm doing this:
std::cout << pthread_self() << std::end;
But it seems like that returns a hexadecimal number. How can I get the actual thread ID in decimal form using some function in the pthread_t.h library?
Right now I'm doing this:
std::cout << pthread_self() << std::end;
But it seems like that returns a hexadecimal number. How can I get the actual thread ID in decimal form using some function in the pthread_t.h library?
If you want threads to have an ID that meets certain requirements, assign them one. They won't "just happen to have one" without you doing something to make it happen.