cpu-set-util: rename cpu_set_reset() -> cpu_set_done()

This also introduces cpu_set_done_and_replace().

No functional change, just refactoring.
This commit is contained in:
Yu Watanabe
2025-06-24 00:20:20 +09:00
parent f4093f43fb
commit 296fe3d511
21 changed files with 80 additions and 77 deletions
+1 -1
View File
@@ -331,7 +331,7 @@ static void test_exec_bindpaths(Manager *m) {
}
static void test_exec_cpuaffinity(Manager *m) {
_cleanup_(cpu_set_reset) CPUSet c = {};
_cleanup_(cpu_set_done) CPUSet c = {};
ASSERT_OK(cpu_set_realloc(&c, 8192)); /* just allocate the maximum possible size */
ASSERT_OK_ERRNO(sched_getaffinity(0, c.allocated, c.set));