Domains
include/smp/domain.h View source View on GitHubStructs
Section titled “Structs”domain
Section titled “domain”struct domain {
size_t id;
size_t num_cores;
struct core **cores;
struct numa_node *associated_node;
struct slab_domain *slab_domain;
struct domain_buddy *domain_buddy;
struct cpu_mask cpu_mask;
}; Functions
Section titled “Functions”domain_local
Section titled “domain_local”struct domain domain_local(void); domain_local_id
Section titled “domain_local_id”size_t domain_local_id(void); domain_init
Section titled “domain_init”void domain_init(void); domain_create_cpu_mask
Section titled “domain_create_cpu_mask”struct cpu_mask * domain_create_cpu_mask(struct domain *domain); domain_set_cpu_mask
Section titled “domain_set_cpu_mask”void domain_set_cpu_mask(struct cpu_mask *mask, struct domain *domain); domain_idle
Section titled “domain_idle”bool domain_idle(struct domain *domain); domain_for_core
Section titled “domain_for_core”size_t domain_for_core(size_t cpu); domain_init_after_smp
Section titled “domain_init_after_smp”void domain_init_after_smp(); domain_dump
Section titled “domain_dump”void domain_dump(void); Macros
Section titled “Macros”CORES_PER_DOMAIN
Section titled “CORES_PER_DOMAIN”#define CORES_PER_DOMAIN 4 domain_for_each_domain
Section titled “domain_for_each_domain”#define domain_for_each_domain(__dom) \
for (size_t __i = 0; \
(__dom = global.domains[__i]), (__i < global.domain_count); __i++) domain_for_each_core
Section titled “domain_for_each_core”#define domain_for_each_core(__dom, __pos) \
for (size_t __i = 0; \
(__pos = __dom->cores[__i]), (__i < __dom->num_cores); __i++) domain_for_each_core_local
Section titled “domain_for_each_core_local”#define domain_for_each_core_local(__pos) \
domain_for_each_core(smp_core()->domain, __pos)