title: Exclusive access to resource from multiple threads
body: <p>Is there something equivalent to SIGSTOP and SICONT for threads? Am using pthreads.
  Thanks</p>
  
  <p>An edit:
  I am implementing a crude form of file access syncronization among threads. So if a file is already opened by a thread, and another thread wants to open it again, I need to halt or pause the second thread at that point of its execution. When the first thread has completed its work it will check what other threads wanted to use a file it released and "wake" them up. The second thread then resumes execution from exactly that point. I use my own book keeping datastructures. </p>