* Create an anonymous set with the provided mask in the space provided by * 'nset'. If the passed in set is anonymous we use its parent otherwise * the new set is a child of 'set'. */
| 994 | * the new set is a child of 'set'. |
| 995 | */ |
| 996 | static int |
| 997 | cpuset_shadow(struct cpuset *set, struct cpuset **nsetp, |
| 998 | const cpuset_t *mask, const struct domainset *domain, |
| 999 | struct setlist *cpusets, struct domainlist *domains) |
| 1000 | { |
| 1001 | struct cpuset *parent; |
| 1002 | struct cpuset *nset; |
| 1003 | struct domainset *dset; |
| 1004 | struct domainset *d; |
| 1005 | int error; |
| 1006 | |
| 1007 | error = cpuset_testshadow(set, mask, domain); |
| 1008 | if (error) |
| 1009 | return (error); |
| 1010 | |
| 1011 | parent = cpuset_getbase(set); |
| 1012 | dset = parent->cs_domain; |
| 1013 | if (mask == NULL) |
| 1014 | mask = &set->cs_mask; |
| 1015 | if (domain != NULL) |
| 1016 | d = domainset_shadow(dset, domain, domains); |
| 1017 | else |
| 1018 | d = set->cs_domain; |
| 1019 | nset = LIST_FIRST(cpusets); |
| 1020 | error = cpuset_init(nset, parent, mask, d, CPUSET_INVALID); |
| 1021 | if (error == 0) { |
| 1022 | LIST_REMOVE(nset, cs_link); |
| 1023 | *nsetp = nset; |
| 1024 | } |
| 1025 | return (error); |
| 1026 | } |
| 1027 | |
| 1028 | static struct cpuset * |
| 1029 | cpuset_update_thread(struct thread *td, struct cpuset *nset) |
no test coverage detected