| 558 | } |
| 559 | |
| 560 | int |
| 561 | taskqueue_cancel_timeout(struct taskqueue *queue, |
| 562 | struct timeout_task *timeout_task, u_int *pendp) |
| 563 | { |
| 564 | u_int pending, pending1; |
| 565 | int error; |
| 566 | |
| 567 | TQ_LOCK(queue); |
| 568 | pending = !!(callout_stop(&timeout_task->c) > 0); |
| 569 | error = taskqueue_cancel_locked(queue, &timeout_task->t, &pending1); |
| 570 | if ((timeout_task->f & DT_CALLOUT_ARMED) != 0) { |
| 571 | timeout_task->f &= ~DT_CALLOUT_ARMED; |
| 572 | queue->tq_callouts--; |
| 573 | } |
| 574 | TQ_UNLOCK(queue); |
| 575 | |
| 576 | if (pendp != NULL) |
| 577 | *pendp = pending + pending1; |
| 578 | return (error); |
| 579 | } |
| 580 | |
| 581 | void |
| 582 | taskqueue_drain(struct taskqueue *queue, struct task *task) |
no test coverage detected