Usable lock implementation with SX-semantics

The current sx(9) implementation has several problems that make it unusable in many areas:

  • Might sleep (cv_wait) on the shared lock acquisition
  • implicit, hardcoded priority order without starvation protection
  • …

Things to look at:

  • Solaris' rwlock
  • Use turnstiles instead of conditional variables
    • Priority propagation
    • No longer just one owner
    • shared/read locks might be acquired recursively

TBD

  • usable_lock_implementation_with_sx-semantics.txt
  • Last modified: 2026/10/12 10:55
  • (external edit)