title: Is pthread_self() expensive?
body: <p>Is <code>pthread_self()</code> expensive on <code>ubuntu 12.04</code> ?<br>
  Does it uses a system call?</p>
  
  <p>I want to call <code>pthread_self()</code> each time a thread wrote to log, so I'll know which thread wrote to log and mention it on the log. All threads write to the same log file.</p>