cpu-set-util: introduce cpu_set_mfree()

This commit is contained in:
Yu Watanabe
2017-12-06 10:32:35 +09:00
parent 6d8a29b2e1
commit a9a2ed3f52
+6
View File
@@ -28,6 +28,12 @@
DEFINE_TRIVIAL_CLEANUP_FUNC(cpu_set_t*, CPU_FREE);
#define _cleanup_cpu_free_ _cleanup_(CPU_FREEp)
static inline cpu_set_t* cpu_set_mfree(cpu_set_t *p) {
if (p)
CPU_FREE(p);
return NULL;
}
cpu_set_t* cpu_set_malloc(unsigned *ncpus);
int parse_cpu_set_internal(const char *rvalue, cpu_set_t **cpu_set, bool warn, const char *unit, const char *filename, unsigned line, const char *lvalue);