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

Function taskqgroup_bind

freebsd/kern/subr_gtaskqueue.c:775–795  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

773}
774
775void
776taskqgroup_bind(struct taskqgroup *qgroup)
777{
778 struct taskq_bind_task *gtask;
779 int i;
780
781 /*
782 * Bind taskqueue threads to specific CPUs, if they have been assigned
783 * one.
784 */
785 if (qgroup->tqg_cnt == 1)
786 return;
787
788 for (i = 0; i < qgroup->tqg_cnt; i++) {
789 gtask = malloc(sizeof(*gtask), M_DEVBUF, M_WAITOK);
790 GTASK_INIT(&gtask->bt_task, 0, 0, taskqgroup_binder, gtask);
791 gtask->bt_cpuid = qgroup->tqg_queue[i].tgc_cpu;
792 grouptaskqueue_enqueue(qgroup->tqg_queue[i].tgc_taskq,
793 &gtask->bt_task);
794 }
795}
796
797struct taskqgroup *
798taskqgroup_create(const char *name, int cnt, int stride)

Callers

nothing calls this directly

Calls 2

mallocFunction · 0.85
grouptaskqueue_enqueueFunction · 0.85

Tested by

no test coverage detected