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

Function cpuset_update_domain

freebsd/kern/kern_cpuset.c:772–795  ·  view source on GitHub ↗

* Applies the mask 'mask' without checking for empty sets or permissions. */

Source from the content-addressed store, hash-verified

770 * Applies the mask 'mask' without checking for empty sets or permissions.
771 */
772static void
773cpuset_update_domain(struct cpuset *set, struct domainset *domain,
774 struct domainset *orig, struct domainlist *domains)
775{
776 struct cpuset *nset;
777
778 mtx_assert(&cpuset_lock, MA_OWNED);
779 /*
780 * If this domainset has changed from the parent we must calculate
781 * a new set. Otherwise it simply inherits from the parent. When
782 * we inherit from the parent we get a new mask and policy. If the
783 * set is modified from the parent we keep the policy and only
784 * update the mask.
785 */
786 if (set->cs_domain != orig) {
787 orig = set->cs_domain;
788 set->cs_domain = domainset_shadow(domain, orig, domains);
789 } else
790 set->cs_domain = domain;
791 LIST_FOREACH(nset, &set->cs_children, cs_siblings)
792 cpuset_update_domain(nset, set->cs_domain, orig, domains);
793
794 return;
795}
796
797/*
798 * Modify the set 'set' to use a copy the domainset provided. Apply this new

Callers 1

cpuset_modify_domainFunction · 0.85

Calls 2

mtx_assertFunction · 0.85
domainset_shadowFunction · 0.85

Tested by

no test coverage detected