On Sat, Nov 24, 2012 at 10:01 AM, Attilio Rao <attilio_at_freebsd.org> wrote: > I seriously wonder why right now we don't assume the lock is unheld. > There are likely historically reasons for that, but I would like to > know which one are those and eventually fix them out. > FWIK, all the other locking primitives assume the lock is already > unheld when destroying and I think it would be good to have that for > mutexes as well. > > Can you please show which lock triggers the panic you saw? > > Thanks, > Attilio > > It was taskqueue_free: void taskqueue_free(struct taskqueue *queue) { TQ_LOCK(queue); queue->tq_flags &= ~TQ_FLAGS_ACTIVE; taskqueue_terminate(queue->tq_threads, queue); KASSERT(TAILQ_EMPTY(&queue->tq_active), ("Tasks still running?")); KASSERT(queue->tq_callouts == 0, ("Armed timeout tasks")); mtx_destroy(&queue->tq_mutex); free(queue->tq_threads, M_TASKQUEUE); free(queue, M_TASKQUEUE); }Received on Sat Nov 24 2012 - 14:46:19 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:32 UTC