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

Function cpuset_setproc_setthread

freebsd/kern/kern_cpuset.c:1116–1139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1114}
1115
1116static int
1117cpuset_setproc_setthread(struct cpuset *tdset, struct cpuset *set,
1118 struct cpuset **nsetp, struct setlist *freelist,
1119 struct domainlist *domainlist)
1120{
1121 struct domainset domain;
1122 cpuset_t mask;
1123 int error;
1124
1125 /*
1126 * If we're replacing on a thread that has not constrained the
1127 * original set we can simply accept the new set.
1128 */
1129 if (tdset->cs_id != CPUSET_INVALID) {
1130 *nsetp = cpuset_ref(set);
1131 return (0);
1132 }
1133 error = cpuset_setproc_setthread_mask(tdset, set, &mask, &domain);
1134 if (error)
1135 return (error);
1136
1137 return cpuset_shadow(set, nsetp, &mask, &domain, freelist,
1138 domainlist);
1139}
1140
1141static int
1142cpuset_setproc_newbase(struct thread *td, struct cpuset *set,

Callers 1

cpuset_setprocFunction · 0.85

Calls 3

cpuset_refFunction · 0.85
cpuset_shadowFunction · 0.85

Tested by

no test coverage detected