cpu-set-util: introduce cpu_set_mfree()
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user