diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-08-16 18:12:19 +0000 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-08-16 18:12:19 +0000 |
commit | b09f19bf24bd4800516e8528716ed6ce82627813 (patch) | |
tree | 8ef5f279d5735ccc12392545eef0098034c05f1e | |
parent | 02bf186308257db22c05f69db3bc9fd261c273cc (diff) | |
download | xen-b09f19bf24bd4800516e8528716ed6ce82627813.tar.gz xen-b09f19bf24bd4800516e8528716ed6ce82627813.tar.bz2 xen-b09f19bf24bd4800516e8528716ed6ce82627813.zip |
Add a couple of well chosen assertions to new context
switch code.
Signed-off-by: Keir Fraser <keir@xensource.com>
-rw-r--r-- | xen/arch/x86/domain.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index 7df964347b..ad8716aac6 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -815,6 +815,8 @@ void context_switch(struct vcpu *prev, struct vcpu *next) { unsigned int cpu = smp_processor_id(); + ASSERT(!local_irq_is_enabled()); + set_current(next); if ( (percpu_ctxt[cpu].curr_vcpu != next) && !is_idle_task(next->domain) ) @@ -828,6 +830,8 @@ void context_switch_finalise(struct vcpu *next) { unsigned int cpu = smp_processor_id(); + ASSERT(local_irq_is_enabled()); + if ( percpu_ctxt[cpu].context_not_finalised ) { percpu_ctxt[cpu].context_not_finalised = 0; |