cpumask: introduce zalloc_cpumask_var
So can get cpumask_var with cpumask_clear Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
3af968e066
commit
0281b5dc03
2 changed files with 27 additions and 0 deletions
|
@ -1022,6 +1022,8 @@ typedef struct cpumask *cpumask_var_t;
|
|||
|
||||
bool alloc_cpumask_var_node(cpumask_var_t *mask, gfp_t flags, int node);
|
||||
bool alloc_cpumask_var(cpumask_var_t *mask, gfp_t flags);
|
||||
bool zalloc_cpumask_var_node(cpumask_var_t *mask, gfp_t flags, int node);
|
||||
bool zalloc_cpumask_var(cpumask_var_t *mask, gfp_t flags);
|
||||
void alloc_bootmem_cpumask_var(cpumask_var_t *mask);
|
||||
void free_cpumask_var(cpumask_var_t mask);
|
||||
void free_bootmem_cpumask_var(cpumask_var_t mask);
|
||||
|
@ -1040,6 +1042,19 @@ static inline bool alloc_cpumask_var_node(cpumask_var_t *mask, gfp_t flags,
|
|||
return true;
|
||||
}
|
||||
|
||||
static inline bool zalloc_cpumask_var(cpumask_var_t *mask, gfp_t flags)
|
||||
{
|
||||
cpumask_clear(*mask);
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline bool zalloc_cpumask_var_node(cpumask_var_t *mask, gfp_t flags,
|
||||
int node)
|
||||
{
|
||||
cpumask_clear(*mask);
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline void alloc_bootmem_cpumask_var(cpumask_var_t *mask)
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue