MPSAFE - Add a set of general blocking/spinnable mutex functions.
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 15 Jul 2009 18:29:43 +0000 (11:29 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 15 Jul 2009 18:29:43 +0000 (11:29 -0700)
commit33b0b87c7f75846a43b41baa24ae0d170d110724
tree10381ca497e80bc8c6fc2f3340ed56b21139d98c
parentab6109fbf5fccc452927e19ab4ed5ad0f62e4a38
MPSAFE - Add a set of general blocking/spinnable mutex functions.

These locks are intended to eventually replace lockmgr locks for most
use cases.

* Optimized based on in-line atomic_cmpset_int() calls with fallback call.

* Recursive shared and exclusive locks.  Downgrading, and non-blocking
  upgrading.

* Interlocked wakeup flags.

* Serial wakeup for exclusive waiters (i.e. optimal in the face of a large
  number of waiting threads).  Mass-wakeup for shared waiters.

* Additional entry points for spinning.

* Ref-count support, separate from lock count.
sys/conf/files
sys/kern/kern_mutex.c [new file with mode: 0644]
sys/sys/mutex.h [new file with mode: 0644]
sys/sys/mutex2.h [new file with mode: 0644]