> On 26 Sep 2016, at 13:36, Ted Unangst <t...@tedunangst.com> wrote: > > David Gwynne wrote: >> + mtx_enter(&timeout_mutex); >> + while (!CIRCQ_EMPTY(&timeout_proc)) { >> + to = timeout_from_circq(CIRCQ_FIRST(&timeout_proc)); >> + CIRCQ_REMOVE(&to->to_list); > leave(); >> + timeout_run(to); > enter(); >> + } >> + mtx_leave(&timeout_mutex); > > you need to drop the mutex when running the timeout. with those changes, looks > pretty good.
timeout_run drops the mutex.