summaryrefslogtreecommitdiff
path: root/include/linux/cpumask.h
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2009-06-06 14:50:36 -0700
committerRusty Russell <rusty@rustcorp.com.au>2009-06-09 22:30:26 +0930
commit0281b5dc0350cbf6dd21ed558a33cccce77abc02 (patch)
tree4523b6f48722eee44a854207e268c71ae4d84771 /include/linux/cpumask.h
parent3af968e066d593bc4dacc021715f3e95ddf0996f (diff)
downloadlinux-3.10-0281b5dc0350cbf6dd21ed558a33cccce77abc02.tar.gz
linux-3.10-0281b5dc0350cbf6dd21ed558a33cccce77abc02.tar.bz2
linux-3.10-0281b5dc0350cbf6dd21ed558a33cccce77abc02.zip
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>
Diffstat (limited to 'include/linux/cpumask.h')
-rw-r--r--include/linux/cpumask.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index 9f315382610..c5ac87ca7bc 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -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)
{
}