diff --git a/lib/libzpool/taskq.c b/lib/libzpool/taskq.c index 456080f7f247..a2ec51d47778 100644 --- a/lib/libzpool/taskq.c +++ b/lib/libzpool/taskq.c @@ -378,3 +378,9 @@ system_taskq_fini(void) system_delay_taskq = NULL; VERIFY0(pthread_key_delete(taskq_tsd)); } + +int +EMPTY_TASKQ(taskq_t *tq) +{ + return (tq->tq_task.tqent_next == &tq->tq_task || tq->tq_active == 0); +}