title: Mutexes in multithread Linux application
body: <p>Could you help me to understand how to use mutexes in multithread Linux application, where:</p>
  
  <ul>
  <li>during data writing it is need to lock variable on write and read</li>
  <li>during data reading from the variable it is need to lock it on write.</li>
  </ul>
  
  <p>So it is possible to read simultaneously, but writing opertion is a single opertaion in the same time. During writing, all other operation should wait before it finishes. </p>