In l4vcpu_irq_restore function don't use l4vcpu_irq_disable(vcpu)

Ildar Ismagilov <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.devel
Message-ID <CADCZxWffU5irj+FJNLwDMBRYDBHzomuo9-07o=5VVmjirTKKDA@mail.gmail.com>
In function l4vcpu_irq_restore on l4/pkg/libvcpu/include/vcpu.h file:

L4_CV L4_INLINE
void
l4vcpu_irq_restore(l4_vcpu_state_t *vcpu, l4vcpu_irq_state_t s,
                   l4_utcb_t *utcb,
                   l4vcpu_event_hndl_t do_event_work_cb,
                   l4vcpu_setup_ipc_t setup_ipc) L4_NOTHROW
{
  if (s & L4_VCPU_F_IRQ)
    l4vcpu_irq_enable(vcpu, utcb, do_event_work_cb, setup_ipc);
}

why don't call  l4vcpu_irq_disable(vcpu) if "s" variable don't include
L4_VCPU_F_IRQ flag?

possible should be so:

L4_CV L4_INLINE
void
l4vcpu_irq_restore(l4_vcpu_state_t *vcpu, l4vcpu_irq_state_t s,
                   l4_utcb_t *utcb,
                   l4vcpu_event_hndl_t do_event_work_cb,
                   l4vcpu_setup_ipc_t setup_ipc) L4_NOTHROW
{
  if (s & L4_VCPU_F_IRQ)
    l4vcpu_irq_enable(vcpu, utcb, do_event_work_cb, setup_ipc);
  else
    l4vcpu_irq_disable(vcpu);
}

-- 
Best regards
Ildar
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.