ia64/xen-unstable

changeset 17615:fe625fd796f8

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>
author Keir Fraser <keir.fraser@citrix.com>
date Thu May 08 13:14:27 2008 +0100 (2008-05-08)
parents 37cf8747f55b
children 0ac957f9d42e
files extras/mini-os/arch/x86/time.c
line diff
     1.1 --- a/extras/mini-os/arch/x86/time.c	Thu May 08 11:55:13 2008 +0100
     1.2 +++ b/extras/mini-os/arch/x86/time.c	Thu May 08 13:14:27 2008 +0100
     1.3 @@ -201,10 +201,12 @@ void block_domain(s_time_t until)
     1.4  {
     1.5      struct timeval tv;
     1.6      gettimeofday(&tv, NULL);
     1.7 +    ASSERT(irqs_disabled());
     1.8      if(monotonic_clock() < until)
     1.9      {
    1.10          HYPERVISOR_set_timer_op(until);
    1.11          HYPERVISOR_sched_op(SCHEDOP_block, 0);
    1.12 +        local_irq_disable();
    1.13      }
    1.14  }
    1.15