4.1.36. Rules of Multimode locks

  • Must hold read/write_lock to read
  • Must hold write_lock to write
  • Must unlock after all access
  • Cannot upgrade/downgrade locks
    • Cannot request new lock while holding one
  • Upgrading permissable (read lock to write)
    • if currently holding sole read access
  • Downgrading permissable (write lock to read)
    • if currently holding write lock