title: How does pthread_create() work?
body: <p>Given the following:</p>
  
  <pre><code>pthread_t thread;
  pthread_create(&amp;thread, NULL, function, NULL);
  </code></pre>
  
  <ul>
  <li><p>What exactly does <code>pthread_create</code> do to <code>thread</code>?</p></li>
  <li><p>What happens to <code>thread</code> after it has joined the main thread and terminated?</p></li>
  <li><p>What happens if, after <code>thread</code> has joined, you do this:</p>
  
  <pre><code>pthread_create(&amp;thread, NULL, another_function, NULL);
  </code></pre></li>
  </ul>