| 500 | } |
| 501 | |
| 502 | static int |
| 503 | task_is_running(struct taskqueue *queue, struct task *task) |
| 504 | { |
| 505 | struct taskqueue_busy *tb; |
| 506 | |
| 507 | TQ_ASSERT_LOCKED(queue); |
| 508 | LIST_FOREACH(tb, &queue->tq_active, tb_link) { |
| 509 | if (tb->tb_running == task) |
| 510 | return (1); |
| 511 | } |
| 512 | return (0); |
| 513 | } |
| 514 | |
| 515 | /* |
| 516 | * Only use this function in single threaded contexts. It returns |
no outgoing calls
no test coverage detected