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:
Yu Watanabe
2025-06-24 00:20:20 +09:00
parent 168351eee7
commit f4093f43fb
5 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -2901,9 +2901,9 @@ int bus_exec_context_set_transient_property(
return -ENOMEM;
/* We forego any optimizations here, and always create the structure using
* cpu_set_add_all(), because we don't want to care if the existing size we
* cpu_set_add_set(), because we don't want to care if the existing size we
* got over dbus is appropriate. */
r = cpu_set_add_all(affinity ? &c->cpu_set : &c->numa_policy.nodes, &set);
r = cpu_set_add_set(affinity ? &c->cpu_set : &c->numa_policy.nodes, &set);
if (r < 0)
return r;
+3 -3
View File
@@ -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) {
+2 -2
View File
@@ -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);
+1 -1
View File
@@ -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;
}
+1 -1
View File
@@ -1396,7 +1396,7 @@ int config_parse_rps_cpu_mask(
cpu_set_reset(mask);
else if (streq(rvalue, "all")) {
r = cpu_mask_add_all(mask);
r = cpu_set_add_all(mask);
if (r < 0) {
log_syntax(unit, LOG_WARNING, filename, line, r,
"Failed to create CPU affinity mask representing \"all\" cpus, ignoring: %m");