cpu-set-util: rename cpu_set_add_all() and cpu_mask_add_all()
This renames - cpu_set_add_all() -> cpu_set_add_set(), - cpu_mask_add_all() -> cpu_set_add_all(). No functional change, just refactoring.
This commit is contained in:
@@ -159,7 +159,7 @@ int cpu_set_add(CPUSet *c, size_t i) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int cpu_set_add_all(CPUSet *c, const CPUSet *src) {
|
||||
int cpu_set_add_set(CPUSet *c, const CPUSet *src) {
|
||||
int r;
|
||||
|
||||
assert(c);
|
||||
@@ -196,7 +196,7 @@ static int cpu_set_add_range(CPUSet *c, size_t start, size_t end) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int cpu_mask_add_all(CPUSet *c) {
|
||||
int cpu_set_add_all(CPUSet *c) {
|
||||
assert(c);
|
||||
|
||||
long m = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
@@ -292,7 +292,7 @@ int parse_cpu_set_extend(
|
||||
return 1;
|
||||
}
|
||||
|
||||
return cpu_set_add_all(old, &cpuset);
|
||||
return cpu_set_add_set(old, &cpuset);
|
||||
}
|
||||
|
||||
int cpus_in_affinity_mask(void) {
|
||||
|
||||
@@ -23,8 +23,8 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(CPUSet*, cpu_set_free);
|
||||
|
||||
int cpu_set_realloc(CPUSet *c, size_t n);
|
||||
int cpu_set_add(CPUSet *c, size_t i);
|
||||
int cpu_set_add_all(CPUSet *c, const CPUSet *src);
|
||||
int cpu_mask_add_all(CPUSet *c);
|
||||
int cpu_set_add_set(CPUSet *c, const CPUSet *src);
|
||||
int cpu_set_add_all(CPUSet *c);
|
||||
|
||||
char* cpu_set_to_string(const CPUSet *c);
|
||||
char* cpu_set_to_range_string(const CPUSet *c);
|
||||
|
||||
@@ -116,7 +116,7 @@ int numa_to_cpu_set(const NUMAPolicy *policy, CPUSet *ret) {
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
r = cpu_set_add_all(&s, &part);
|
||||
r = cpu_set_add_set(&s, &part);
|
||||
if (r < 0)
|
||||
return r;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user