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

Function cpuset_testshadow

freebsd/kern/kern_cpuset.c:965–989  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

963}
964
965static int
966cpuset_testshadow(struct cpuset *set, const cpuset_t *mask,
967 const struct domainset *domain)
968{
969 struct cpuset *parent;
970 struct domainset *dset;
971
972 parent = cpuset_getbase(set);
973 /*
974 * If we are restricting a cpu mask it must be a subset of the
975 * parent or invalid CPUs have been specified.
976 */
977 if (mask != NULL && !CPU_SUBSET(&parent->cs_mask, mask))
978 return (EINVAL);
979
980 /*
981 * If we are restricting a domain mask it must be a subset of the
982 * parent or invalid domains have been specified.
983 */
984 dset = parent->cs_domain;
985 if (domain != NULL && !domainset_valid(dset, domain))
986 return (EINVAL);
987
988 return (0);
989}
990
991/*
992 * Create an anonymous set with the provided mask in the space provided by

Callers 2

cpuset_shadowFunction · 0.85

Calls 2

cpuset_getbaseFunction · 0.85
domainset_validFunction · 0.85

Tested by

no test coverage detected