aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/sched-if.h
diff options
context:
space:
mode:
authorDario Faggioli <dario.faggioli@citrix.com>2012-12-18 13:17:27 +0000
committerDario Faggioli <dario.faggioli@citrix.com>2012-12-18 13:17:27 +0000
commit0bba5747f4bee4ddd24e7c0d1c6cf1fdac0e4721 (patch)
tree12b6ab53f2460a5de14664b673d47854b322e4f4 /xen/include/xen/sched-if.h
parent4f5393cca4898450f8adec98926320445b44baa3 (diff)
downloadxen-0bba5747f4bee4ddd24e7c0d1c6cf1fdac0e4721.tar.gz
xen-0bba5747f4bee4ddd24e7c0d1c6cf1fdac0e4721.tar.bz2
xen-0bba5747f4bee4ddd24e7c0d1c6cf1fdac0e4721.zip
xen: sched_credit: define and use curr_on_cpu(cpu)
To fetch `per_cpu(schedule_data,cpu).curr' in a more readable way. It's in sched-if.h as that is where `struct schedule_data' is declared. Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com> Acked-by: George Dunlap <george.dunlap@citrix.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.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/xen/include/xen/sched-if.h b/xen/include/xen/sched-if.h
index bd6186a9f1..9ace22cb66 100644
--- a/xen/include/xen/sched-if.h
+++ b/xen/include/xen/sched-if.h
@@ -41,6 +41,8 @@ struct schedule_data {
atomic_t urgent_count; /* how many urgent vcpus */
};
+#define curr_on_cpu(c) (per_cpu(schedule_data, c).curr)
+
DECLARE_PER_CPU(struct schedule_data, schedule_data);
DECLARE_PER_CPU(struct scheduler *, scheduler);
DECLARE_PER_CPU(struct cpupool *, cpupool);