basic: split out cpu set specific APIs into cpu-set-util.[ch]

This commit is contained in:
Lennart Poettering
2015-09-30 22:26:16 +02:00
parent 94d75d6423
commit 618234a525
12 changed files with 201 additions and 141 deletions
-7
View File
@@ -28,7 +28,6 @@
#include <limits.h>
#include <locale.h>
#include <mntent.h>
#include <sched.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
@@ -371,12 +370,6 @@ int fd_is_temporary_fs(int fd);
int pipe_eof(int fd);
DEFINE_TRIVIAL_CLEANUP_FUNC(cpu_set_t*, CPU_FREE);
#define _cleanup_cpu_free_ _cleanup_(CPU_FREEp)
cpu_set_t* cpu_set_malloc(unsigned *ncpus);
int parse_cpu_set_and_warn(const char *rvalue, cpu_set_t **cpu_set, const char *unit, const char *filename, unsigned line, const char *lvalue);
#define xsprintf(buf, fmt, ...) \
assert_message_se((size_t) snprintf(buf, ELEMENTSOF(buf), fmt, __VA_ARGS__) < ELEMENTSOF(buf), \
"xsprintf: " #buf "[] must be big enough")