title: How to set the name of a thread in Linux pthreads?
body: <p>Is there any way of setting the name of a thread in Linux?</p>
  
  <p>My main purpose is it would be helpful while debugging, and also nice if that name was exposed through e.g. <code>/proc/$PID/task/$TID/...</code></p>