core: merge multiple CPUAffinity= settings

This commit is contained in:
Yu Watanabe
2017-12-06 10:32:42 +09:00
parent da681e1bd2
commit 501941aaf0
3 changed files with 56 additions and 17 deletions
+6
View File
@@ -25,6 +25,12 @@
#include "macro.h"
#ifdef __NCPUBITS
#define CPU_SIZE_TO_NUM(n) ((n) * __NCPUBITS)
#else
#define CPU_SIZE_TO_NUM(n) ((n) * sizeof(cpu_set_t) * 8)
#endif
DEFINE_TRIVIAL_CLEANUP_FUNC(cpu_set_t*, CPU_FREE);
#define _cleanup_cpu_free_ _cleanup_(CPU_FREEp)