| 579 | } |
| 580 | |
| 581 | void |
| 582 | taskqueue_drain(struct taskqueue *queue, struct task *task) |
| 583 | { |
| 584 | |
| 585 | if (!queue->tq_spin) |
| 586 | WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, __func__); |
| 587 | |
| 588 | TQ_LOCK(queue); |
| 589 | while (task->ta_pending != 0 || task_is_running(queue, task)) |
| 590 | TQ_SLEEP(queue, task, "tq_drain"); |
| 591 | TQ_UNLOCK(queue); |
| 592 | } |
| 593 | |
| 594 | void |
| 595 | taskqueue_drain_all(struct taskqueue *queue) |
no test coverage detected