diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-05-08 13:14:27 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-05-08 13:14:27 +0100 |
commit | 5991224aff6747d3d50e83da00659a0a277c9cc0 (patch) | |
tree | 24e2e0aa6bf59a264899aa867b0ca75bbd72f38b /extras/mini-os/arch | |
parent | aec0c76f2272eb6551a370a24a0c53b32efbb9bf (diff) | |
download | xen-5991224aff6747d3d50e83da00659a0a277c9cc0.tar.gz xen-5991224aff6747d3d50e83da00659a0a277c9cc0.tar.bz2 xen-5991224aff6747d3d50e83da00659a0a277c9cc0.zip |
minios: fix and enforce block_domain atomicity
To ensure that the timer event is not lost, block_domain requires that
event delivery is disabled. SCHEDOP_block re-enables them, so for
coherency (and fixing a bug actually), we should re-disable them
after. Also, make sure that the caller disabled them.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Diffstat (limited to 'extras/mini-os/arch')
-rw-r--r-- | extras/mini-os/arch/x86/time.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/extras/mini-os/arch/x86/time.c b/extras/mini-os/arch/x86/time.c index a396dc279f..d7b387f95f 100644 --- a/extras/mini-os/arch/x86/time.c +++ b/extras/mini-os/arch/x86/time.c @@ -201,10 +201,12 @@ void block_domain(s_time_t until) { struct timeval tv; gettimeofday(&tv, NULL); + ASSERT(irqs_disabled()); if(monotonic_clock() < until) { HYPERVISOR_set_timer_op(until); HYPERVISOR_sched_op(SCHEDOP_block, 0); + local_irq_disable(); } } |