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.