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

Function domainset_shadow

freebsd/kern/kern_cpuset.c:608–628  ·  view source on GitHub ↗

* Create a new set that is a subset of a parent. */

Source from the content-addressed store, hash-verified

606 * Create a new set that is a subset of a parent.
607 */
608static struct domainset *
609domainset_shadow(const struct domainset *pdomain,
610 const struct domainset *domain, struct domainlist *freelist)
611{
612 struct domainset *ndomain;
613
614 ndomain = LIST_FIRST(freelist);
615 LIST_REMOVE(ndomain, ds_link);
616
617 /*
618 * Initialize the key from the request.
619 */
620 domainset_copy(domain, ndomain);
621
622 /*
623 * Restrict the key by the parent.
624 */
625 DOMAINSET_AND(&ndomain->ds_mask, &pdomain->ds_mask);
626
627 return _domainset_create(ndomain, freelist);
628}
629
630/*
631 * Recursively check for errors that would occur from applying mask to

Callers 3

cpuset_update_domainFunction · 0.85
cpuset_shadowFunction · 0.85
cpuset_setproc_newbaseFunction · 0.85

Calls 2

domainset_copyFunction · 0.85
_domainset_createFunction · 0.85

Tested by

no test coverage detected