| 530 | } |
| 531 | |
| 532 | static int |
| 533 | taskqueue_cancel_locked(struct taskqueue *queue, struct task *task, |
| 534 | u_int *pendp) |
| 535 | { |
| 536 | |
| 537 | if (task->ta_pending > 0) { |
| 538 | STAILQ_REMOVE(&queue->tq_queue, task, task, ta_link); |
| 539 | if (queue->tq_hint == task) |
| 540 | queue->tq_hint = NULL; |
| 541 | } |
| 542 | if (pendp != NULL) |
| 543 | *pendp = task->ta_pending; |
| 544 | task->ta_pending = 0; |
| 545 | return (task_is_running(queue, task) ? EBUSY : 0); |
| 546 | } |
| 547 | |
| 548 | int |
| 549 | taskqueue_cancel(struct taskqueue *queue, struct task *task, u_int *pendp) |
no test coverage detected