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

Function taskqueue_drain_timeout

freebsd/kern/subr_taskqueue.c:607–630  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

605}
606
607void
608taskqueue_drain_timeout(struct taskqueue *queue,
609 struct timeout_task *timeout_task)
610{
611
612 /*
613 * Set flag to prevent timer from re-starting during drain:
614 */
615 TQ_LOCK(queue);
616 KASSERT((timeout_task->f & DT_DRAIN_IN_PROGRESS) == 0,
617 ("Drain already in progress"));
618 timeout_task->f |= DT_DRAIN_IN_PROGRESS;
619 TQ_UNLOCK(queue);
620
621 callout_drain(&timeout_task->c);
622 taskqueue_drain(queue, &timeout_task->t);
623
624 /*
625 * Clear flag to allow timer to re-start:
626 */
627 TQ_LOCK(queue);
628 timeout_task->f &= ~DT_DRAIN_IN_PROGRESS;
629 TQ_UNLOCK(queue);
630}
631
632void
633taskqueue_quiesce(struct taskqueue *queue)

Callers 3

ieee80211_superg_detachFunction · 0.85
ieee80211_swscan_detachFunction · 0.85
clock_unregisterFunction · 0.85

Calls 1

taskqueue_drainFunction · 0.85

Tested by

no test coverage detected