Merge branch 'condvar'
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 17 Oct 2012 15:47:07 +0000 (08:47 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 17 Oct 2012 15:48:29 +0000 (08:48 -0700)
Auditing the code to verify that all instances of cv_signal() and
cv_broadcast() are called under the proper associated mutex turned
up several races. None of these have been conclusively seen in the
wild but the following patch set resolves them.

For reference, from the cv_signal(9F) man page:

  cv_signal() signals the condition and wakes one blocked thread.
  All blocked threads can be unblocked by calling cv_broadcast().
  You must acquire the mutex passed into cv_wait() before calling
  cv_signal() or cv_broadcast()

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1048


Trivial merge