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

Function taskqueue_cancel_timeout

freebsd/kern/subr_taskqueue.c:560–579  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

558}
559
560int
561taskqueue_cancel_timeout(struct taskqueue *queue,
562 struct timeout_task *timeout_task, u_int *pendp)
563{
564 u_int pending, pending1;
565 int error;
566
567 TQ_LOCK(queue);
568 pending = !!(callout_stop(&timeout_task->c) > 0);
569 error = taskqueue_cancel_locked(queue, &timeout_task->t, &pending1);
570 if ((timeout_task->f & DT_CALLOUT_ARMED) != 0) {
571 timeout_task->f &= ~DT_CALLOUT_ARMED;
572 queue->tq_callouts--;
573 }
574 TQ_UNLOCK(queue);
575
576 if (pendp != NULL)
577 *pendp = pending + pending1;
578 return (error);
579}
580
581void
582taskqueue_drain(struct taskqueue *queue, struct task *task)

Callers 5

taskq_cancel_idFunction · 0.85
ieee80211_superg_detachFunction · 0.85
scan_signal_lockedFunction · 0.85
scan_curchan_taskFunction · 0.85
clock_unregisterFunction · 0.85

Calls 1

taskqueue_cancel_lockedFunction · 0.85

Tested by

no test coverage detected