mlock() and Threading
<p>Can mlock() be called safely from independently executing OpenMP or Posix threads, given that each thread is operating on a different region of virtual memory?  Does it create a systemwide synchronization barrier or force all threads to stall in some way?</p>

<p>I apologize if this is a duplicate; I was surprised when google searches for "mlock openmp"/"mlock thread safety" did not turn up the answer immediately.  Closest I could find was the second answer of <a href="https://stackoverflow.com/questions/24939931/non-blocking-mlock">Non-blocking mlock()</a>, which seems to indicate that mlock() CAN be called from separate threads and does not enforce or require any synchronization barriers.</p>