title: How to assign unique ids to threads in a pthread wrapper?
body: <p>Say I am writing a pthread wrapper. I try to assign unique ids to threads in thread creation phase so that I can make the execution deterministic. How can I let each thread know his unique id?</p>