Well, folks, here is a first pass recursive locks! The attached diffs
are against -current as of a few minutes ago.

Oh, heh, I thought we have recursive lock support. But with that gone
from the vfs locks, I guess not (apart from the kernel lock ;).

:)

I'm not sure if it's a good idea to change the size of kmutex_t. I guess
plenty of data structures have carefully been adjusted by hand to its
size and I don't know of any automatic way to recalculate that stuff.
Even if not, since this is the only user and we probably won't have
that many of them even in the future, why not just define a new type
``rmutex'' which contains a kmutex, an owner and the counter? It feels
wrong to punish all the normal kmutex users for just one use. It'll also
make the implementation a lot simpler to test, since it's purely MI.
"separate normal case and worst case"

Good point, and it will be a lot less work, too! :) And it solves the
problem of not permitting a rmutex being used with condvars.

One question: Since an adaptive kmutex_t already includes an owner
field, would we really need to have another copy of it in the rmutex_t
structure?