kernel - revamp mtx_spinlock()
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 20 Oct 2010 06:19:29 +0000 (23:19 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 24 Oct 2010 16:32:40 +0000 (09:32 -0700)
commitc40689e9b134213e4a3e29c2548d0ec47c7dd40b
tree85ea791ecaa08ee7881dcf941d0b2bbf93428e6d
parent46413ae74da286de584d200fe796377987701dc2
kernel - revamp mtx_spinlock()

* Revamp mtx_spinlock(), add mtx_spinlock_try(), and add mtx_spinunlock().

* Enter a proper hard critical section when using mtx_spinlock*(),
  just like the normal spinlock() code does.

  The difference is that mtx spinlocks have a ref count and thus are
  reentrant.

* mtx_spinlock*() is not used in the code yet.  A followup commit will
  begin using it for the syscons lock.
sys/kern/kern_mutex.c
sys/sys/mutex.h
sys/sys/mutex2.h