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>
Wed, 20 Oct 2010 06:24:52 +0000 (23:24 -0700)
commit38c3ee9b0b1222fcb84c6fe9da02ab2ff31e3faf
treedd4ffaab765f00f0587d445283c0b5d3220e0380
parent66abcddafd5754f9f51e65d383ee8655d0f926f9
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