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

Function taskqgroup_create

freebsd/kern/subr_gtaskqueue.c:797–814  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

795}
796
797struct taskqgroup *
798taskqgroup_create(const char *name, int cnt, int stride)
799{
800 struct taskqgroup *qgroup;
801 int cpu, i, j;
802
803 qgroup = malloc(sizeof(*qgroup), M_GTASKQUEUE, M_WAITOK | M_ZERO);
804 mtx_init(&qgroup->tqg_lock, "taskqgroup", NULL, MTX_DEF);
805 qgroup->tqg_name = name;
806 qgroup->tqg_cnt = cnt;
807
808 for (cpu = i = 0; i < cnt; i++) {
809 taskqgroup_cpu_create(qgroup, i, cpu);
810 for (j = 0; j < stride; j++)
811 cpu = CPU_NEXT(cpu);
812 }
813 return (qgroup);
814}
815
816void
817taskqgroup_destroy(struct taskqgroup *qgroup)

Callers

nothing calls this directly

Calls 3

mallocFunction · 0.85
mtx_initFunction · 0.85
taskqgroup_cpu_createFunction · 0.85

Tested by

no test coverage detected