Use taskqueue_quiesce(9) to implement taskq_wait().

PR:		227784
Reviewed by:	cem
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D17975
This commit is contained in:
markj 2018-11-21 17:19:08 +00:00
parent 0e3d68b2b4
commit 746f5464d4

View File

@ -171,11 +171,11 @@ taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, u_int flags,
void
taskq_wait(taskq_t *tq)
{
taskqueue_drain_all(tq->tq_queue);
taskqueue_quiesce(tq->tq_queue);
}
void
taskq_wait_id(taskq_t *tq, taskqid_t id)
{
taskq_wait(tq);
taskqueue_drain_all(tq->tq_queue);
}