* Create the domainset for cpuset 0, 1 and cpuset 2. */
| 1557 | * Create the domainset for cpuset 0, 1 and cpuset 2. |
| 1558 | */ |
| 1559 | void |
| 1560 | domainset_zero(void) |
| 1561 | { |
| 1562 | struct domainset *dset, *tmp; |
| 1563 | |
| 1564 | mtx_init(&cpuset_lock, "cpuset", NULL, MTX_SPIN | MTX_RECURSE); |
| 1565 | |
| 1566 | dset = &domainset0; |
| 1567 | DOMAINSET_COPY(&all_domains, &dset->ds_mask); |
| 1568 | dset->ds_policy = DOMAINSET_POLICY_FIRSTTOUCH; |
| 1569 | dset->ds_prefer = -1; |
| 1570 | curthread->td_domain.dr_policy = _domainset_create(dset, NULL); |
| 1571 | |
| 1572 | domainset_copy(dset, &domainset2); |
| 1573 | domainset2.ds_policy = DOMAINSET_POLICY_INTERLEAVE; |
| 1574 | kernel_object->domain.dr_policy = _domainset_create(&domainset2, NULL); |
| 1575 | |
| 1576 | /* Remove empty domains from the global policies. */ |
| 1577 | LIST_FOREACH_SAFE(dset, &cpuset_domains, ds_link, tmp) |
| 1578 | if (domainset_empty_vm(dset)) |
| 1579 | LIST_REMOVE(dset, ds_link); |
| 1580 | } |
| 1581 | |
| 1582 | /* |
| 1583 | * Creates system-wide cpusets and the cpuset for thread0 including three |
no test coverage detected