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;
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);
return 0;
}
-int cpu_mask_add_all(CPUSet *c) {
+int cpu_set_add_all(CPUSet *c) {
assert(c);
long m = sysconf(_SC_NPROCESSORS_ONLN);
return 1;
}
- return cpu_set_add_all(old, &cpuset);
+ return cpu_set_add_set(old, &cpuset);
}
int cpus_in_affinity_mask(void) {
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);
if (r < 0)
return r;
- r = cpu_set_add_all(&s, &part);
+ r = cpu_set_add_set(&s, &part);
if (r < 0)
return r;
}
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");