| 605 | } |
| 606 | |
| 607 | void |
| 608 | taskqueue_drain_timeout(struct taskqueue *queue, |
| 609 | struct timeout_task *timeout_task) |
| 610 | { |
| 611 | |
| 612 | /* |
| 613 | * Set flag to prevent timer from re-starting during drain: |
| 614 | */ |
| 615 | TQ_LOCK(queue); |
| 616 | KASSERT((timeout_task->f & DT_DRAIN_IN_PROGRESS) == 0, |
| 617 | ("Drain already in progress")); |
| 618 | timeout_task->f |= DT_DRAIN_IN_PROGRESS; |
| 619 | TQ_UNLOCK(queue); |
| 620 | |
| 621 | callout_drain(&timeout_task->c); |
| 622 | taskqueue_drain(queue, &timeout_task->t); |
| 623 | |
| 624 | /* |
| 625 | * Clear flag to allow timer to re-start: |
| 626 | */ |
| 627 | TQ_LOCK(queue); |
| 628 | timeout_task->f &= ~DT_DRAIN_IN_PROGRESS; |
| 629 | TQ_UNLOCK(queue); |
| 630 | } |
| 631 | |
| 632 | void |
| 633 | taskqueue_quiesce(struct taskqueue *queue) |
no test coverage detected