title: C pthread synchronize function
body: <p>Is there a function in pthread library to synchronize threads? Not mutexes, not semaphores, just one call function. It is supposed to lock the threads that get in that point until all the threads reach such function. E.g:</p>
  
  <pre><code>function thread_worker(){
      //hard working
  
      syncThreads();
      printf("all threads are sync\n");
  }
  </code></pre>
  
  <p>So the printf is called only when all the threads end the hard working.</p>