title: critical sections: multiple readers, single writer
body: <p>I would like to have the following scheme:</p>
  
  <p>one mutex struct.</p>
  
  <p>a writer can enter the critical section only if no other thread is there.</p>
  
  <p>a reader can enter the critical section only if the other threads currently there are also readers.</p>
  
  <p>I am not sure how to implement this with critical_sections (as I don't want the readers to be mutually 
  exclusive)</p>
  
  <p>Any ideas?</p>
  
  <p>Thanks!</p>