| 963 | } |
| 964 | |
| 965 | static int |
| 966 | cpuset_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 |
no test coverage detected