aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/sched-if.h
diff options
context:
space:
mode:
authorJuergen Gross <juergen.gross@ts.fujitsu.com>2012-01-24 14:19:58 +0000
committerJuergen Gross <juergen.gross@ts.fujitsu.com>2012-01-24 14:19:58 +0000
commit9b80635f9dd46b584f04c8e948a71c48bd412f96 (patch)
tree65d633f3bdd797f2207ecd2fef863ccf48c2d07c /xen/include/xen/sched-if.h
parent04b9829949d79e753c8047f4ef620a82b1743349 (diff)
downloadxen-9b80635f9dd46b584f04c8e948a71c48bd412f96.tar.gz
xen-9b80635f9dd46b584f04c8e948a71c48bd412f96.tar.bz2
xen-9b80635f9dd46b584f04c8e948a71c48bd412f96.zip
introduce and use common macros for selecting cpupool based cpumasks
There are several instances of the same construct finding the cpumask for a cpupool. Use macros instead. Signed-off-by: juergen.gross@ts.fujitsu.com Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/include/xen/sched-if.h')
-rw-r--r--xen/include/xen/sched-if.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/xen/include/xen/sched-if.h b/xen/include/xen/sched-if.h
index 03f9d8ddcc..d6fa15a702 100644
--- a/xen/include/xen/sched-if.h
+++ b/xen/include/xen/sched-if.h
@@ -204,4 +204,9 @@ struct cpupool
atomic_t refcnt;
};
+#define cpupool_scheduler_cpumask(_pool) \
+ (((_pool) == NULL) ? &cpupool_free_cpus : (_pool)->cpu_valid)
+#define cpupool_online_cpumask(_pool) \
+ (((_pool) == NULL) ? &cpu_online_map : (_pool)->cpu_valid)
+
#endif /* __XEN_SCHED_IF_H__ */