HomeFreeBSD

Several improvements to rmlock(9). Many of these are based on patches
rS252209Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

Several improvements to rmlock(9). Many of these are based on patches
provided by Isilon.

  • Add an rm_assert() supporting various lock assertions similar to other locking primitives. Because rmlocks track readers the assertions are always fully accurate unlike rw_assert() and sx_assert().
  • Flesh out the lock class methods for rmlocks to support sleeping via condvars and rm_sleep() (but only while holding write locks), rmlock details in 'show lock' in DDB, and the lc_owner method used by dtrace.
  • Add an internal destroyed cookie so that API functions can assert that an rmlock is not destroyed.
  • Make use of rm_assert() to add various assertions to the API (e.g. to assert locks are held when an unlock routine is called).
  • Give RM_SLEEPABLE locks their own lock class and always use the rmlock's own lock_object with WITNESS.
  • Use THREAD_NO_SLEEPING() / THREAD_SLEEPING_OK() to disallow sleeping while holding a read lock on an rmlock.

Submitted by: andre
Obtained from: EMC/Isilon

Details

Provenance
jhbAuthored on
Parents
rS252208: Release David Somayajulu from mentorship.
Branches
Unknown
Tags
Unknown