vkernel - Unbreak 32-bit vkernel builds by fixing broken assertion
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 1 Jan 2012 23:08:37 +0000 (15:08 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 1 Jan 2012 23:08:37 +0000 (15:08 -0800)
commit01672f8c3a3fd28ea54576da47af9f0521fd01f3
treef4c257cca9610b79f4f3320dd6a4efa41bbdfe73
parent7f84a1ea252f031c74a5896f5eeb10fc5ef2df0f
vkernel - Unbreak 32-bit vkernel builds by fixing broken assertion

* [ASSERT_]MP_LOCK_HELD() was not properly handling the new token
  t_count format.

* Rename and document the functions a bit better.  Currently our
  more expansive token test for (shared or exclusive) is not
  a perfect test because we don't want to eat cpu time iterating
  the thread's token array to check for shared tokens.  So we just
  check for a shared count.

  Works well for assertions, wouldn't work very well for conditional
  acquisition (of a shared token).

* Exclusive token tests are perfect.

Reported-by: tuxillo
sys/sys/mplock2.h
sys/sys/thread.h
sys/sys/thread2.h