Only hold theReduce the scope of reset_mutext to sleep withprotect the msleep. This usage likely could in the watch dog
be converted to a pause even, withthread as well as the reset_mutex eliminatedMPI3MR_FLAGS_SHUTDOWN bit. I leftUse it to protect the
it, even though reset_mutex doesn't appear to protect anything. All thewakeup in mpi3mr_detach so this thread can exit sooner when we're trying
data that the watchdog thread accesses is notto do an orderly shutdown.
It's an open question if this should protected by reset_mutex sc->unrecoverable, and if
elsewhere. A quick eyeball suggests that it isn't needed, but perhaps awe should wakeup the watchdog thread when we set it.
more thorough review might show something. We need to not hold any
mutexes when we call taskqueue_drain to avoid deadlock (and a WITNESS
warning), so would have to drop it then if we needed it for the other
data. It's a lot easier to accomodate this need if I don't take the next
step and convert this to pause_sbt(SBT_1S) now.
Sponsored by: Netflix