title: Do pthread mutexes work across threads if in shared memory?
body: <p>I found this:
  <a href="https://stackoverflow.com/questions/2284730/fast-interprocess-synchronization-method">Fast interprocess synchronization method</a></p>
  
  <p>I used to believe that a pthread mutex can only be shared between two threads in the same <em>address space</em>.</p>
  
  <p>The question / answers there seems to imply:</p>
  
  <p>If I have two separate proceses A &amp; B. They have a shared memory region M. I can put a pThread mutex in M, lock in A, lock in B, unlock in A; and B will no longer block on the mutex. Is this correct? Can pThread mutexes be shared in two separate processes?</p>
  
  <p>Edit: I'm using C++, on MacOSX.</p>