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

Function taskqgroup_detach

freebsd/kern/subr_gtaskqueue.c:736–753  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

734}
735
736void
737taskqgroup_detach(struct taskqgroup *qgroup, struct grouptask *gtask)
738{
739 int i;
740
741 grouptask_block(gtask);
742 mtx_lock(&qgroup->tqg_lock);
743 for (i = 0; i < qgroup->tqg_cnt; i++)
744 if (qgroup->tqg_queue[i].tgc_taskq == gtask->gt_taskqueue)
745 break;
746 if (i == qgroup->tqg_cnt)
747 panic("%s: task %s not in group", __func__, gtask->gt_name);
748 qgroup->tqg_queue[i].tgc_cnt--;
749 LIST_REMOVE(gtask, gt_list);
750 mtx_unlock(&qgroup->tqg_lock);
751 gtask->gt_taskqueue = NULL;
752 gtask->gt_task.ta_flags &= ~TASK_NOENQUEUE;
753}
754
755static void
756taskqgroup_binder(void *ctx)

Callers 2

iflib_tqg_detachFunction · 0.85

Calls 4

grouptask_blockFunction · 0.85
mtx_lockFunction · 0.70
panicFunction · 0.70
mtx_unlockFunction · 0.70

Tested by

no test coverage detected