Commit dcee2280 authored by Yury Norov's avatar Yury Norov Committed by Paolo Abeni

cpumask: define cleanup function for cpumasks

Now we can simplify code that allocates cpumasks for local needs.
Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent c1f5204e
......@@ -7,6 +7,7 @@
* set of CPUs in a system, one bit position per CPU number. In general,
* only nr_cpu_ids (<= NR_CPUS) bits are valid.
*/
#include <linux/cleanup.h>
#include <linux/kernel.h>
#include <linux/threads.h>
#include <linux/bitmap.h>
......@@ -990,6 +991,8 @@ static inline bool cpumask_available(cpumask_var_t mask)
}
#endif /* CONFIG_CPUMASK_OFFSTACK */
DEFINE_FREE(free_cpumask_var, struct cpumask *, if (_T) free_cpumask_var(_T));
/* It's common to want to use cpu_all_mask in struct member initializers,
* so it has to refer to an address rather than a pointer. */
extern const DECLARE_BITMAP(cpu_all_bits, NR_CPUS);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment