* Only use this function in single threaded contexts. It returns * non-zero if the given task is either pending or running. Else the * task is idle and can be queued again or freed. */
| 518 | * task is idle and can be queued again or freed. |
| 519 | */ |
| 520 | int |
| 521 | taskqueue_poll_is_busy(struct taskqueue *queue, struct task *task) |
| 522 | { |
| 523 | int retval; |
| 524 | |
| 525 | TQ_LOCK(queue); |
| 526 | retval = task->ta_pending > 0 || task_is_running(queue, task); |
| 527 | TQ_UNLOCK(queue); |
| 528 | |
| 529 | return (retval); |
| 530 | } |
| 531 | |
| 532 | static int |
| 533 | taskqueue_cancel_locked(struct taskqueue *queue, struct task *task, |
nothing calls this directly
no test coverage detected