MCPcopy Create free account
hub / github.com/F-Stack/f-stack / taskqueue_poll_is_busy

Function taskqueue_poll_is_busy

freebsd/kern/subr_taskqueue.c:520–530  ·  view source on GitHub ↗

* 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. */

Source from the content-addressed store, hash-verified

518 * task is idle and can be queued again or freed.
519 */
520int
521taskqueue_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
532static int
533taskqueue_cancel_locked(struct taskqueue *queue, struct task *task,

Callers

nothing calls this directly

Calls 1

task_is_runningFunction · 0.70

Tested by

no test coverage detected